Commit f4f8cb2f authored by Mariusz's avatar Mariusz Committed by Mariusz
Browse files

Legacy format is disabled/enabled on demand according to `legacy-format` parameter

parent 295ea984
......@@ -42,6 +42,7 @@ template<typename T>
struct serializer_wrapper
{
T value;
bool legacy_enabled = dynamic_serializer::default_legacy_value;
};
} } // hive::protocol
......@@ -66,6 +67,7 @@ namespace fc {
{
try
{
legacy_switcher switcher( a.legacy_enabled );
to_variant( a.value, var );
} FC_CAPTURE_AND_RETHROW()
}
......
This diff is collapsed.
......@@ -104,7 +104,7 @@ int main( int argc, char** argv )
("wallet-file,w", bpo::value<string>()->implicit_value("wallet.json"), "Wallet to load")
("chain-id", bpo::value< std::string >()->default_value( HIVE_CHAIN_ID ), "Chain ID to connect to")
("format-type", bpo::value< std::string >(), "Allows to change formatting for functions that require special formatting" )
("legacy-format", bpo::value< bool >()->default_value( dynamic_serializer::legacy_enabled ), "Allows to generate JSON using legacy/non legacy format. By default is true." )
("legacy-format", bpo::value< bool >()->default_value( !dynamic_serializer::legacy_enabled ), "Allows to generate JSON using legacy/non legacy format. By default is true." )
;
vector<string> allowed_ips;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment