Make submit_multisigned command line consistent (RIPD-182):

In command line usage (only), the "sign", "submit", and "sign_for"
commands do not require the submitted JSON to be wrapped in a
tx_json object.  Make the submit_multisigned command line behave
consistently with the command line form of those other commands.
This commit is contained in:
Scott Schurr
2015-10-16 16:28:35 -07:00
committed by Nik Bougalis
parent 6dbbb7406c
commit 323164877c

View File

@@ -675,18 +675,16 @@ private:
// submit_multisigned <json>
Json::Value parseSubmitMultiSigned (Json::Value const& jvParams)
{
Json::Value jvRequest;
Json::Reader reader;
bool const bOffline = 2 == jvParams.size () && jvParams[1u].asString () == "offline";
if ((1 == jvParams.size () || bOffline)
&& reader.parse (jvParams[0u].asString (), jvRequest))
if (1 == jvParams.size ())
{
// Multisigned.
if (bOffline)
jvRequest["offline"] = true;
return jvRequest;
Json::Value txJSON;
Json::Reader reader;
if (reader.parse (jvParams[0u].asString (), txJSON))
{
Json::Value jvRequest;
jvRequest[jss::tx_json] = txJSON;
return jvRequest;
}
}
return rpcError (rpcINVALID_PARAMS);