mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
2-level transaction multi-signatures (RIPD-182):
This commit provides support for 2-level multi-signing of transactions. The ability is usually compiled out, since other aspects of multi-signing are not yet complete. Here are the missing parts: o Full support for Tickets in transactions. o Variable fees based on the number of signers, o Multiple SignerLists with access control flags on accounts, o Enable / disable operations based on access control flags, o Enable / disable all of multi-signing based on an amendment, o Integration tests, and o Documentation.
This commit is contained in:
committed by
Vinnie Falco
parent
cf1638e6de
commit
d6ef66646f
@@ -659,6 +659,28 @@ private:
|
||||
return rpcError (rpcINVALID_PARAMS);
|
||||
}
|
||||
|
||||
// submit any multisigned transaction to the network
|
||||
//
|
||||
// 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))
|
||||
{
|
||||
// Multisigned.
|
||||
if (bOffline)
|
||||
jvRequest["offline"] = true;
|
||||
|
||||
return jvRequest;
|
||||
}
|
||||
|
||||
return rpcError (rpcINVALID_PARAMS);
|
||||
}
|
||||
|
||||
// tx <transaction_id>
|
||||
Json::Value parseTx (Json::Value const& jvParams)
|
||||
{
|
||||
@@ -859,6 +881,9 @@ public:
|
||||
{ "sign_for", &RPCParser::parseSignFor, 4, 4 },
|
||||
#endif // RIPPLE_ENABLE_MULTI_SIGN
|
||||
{ "submit", &RPCParser::parseSignSubmit, 1, 3 },
|
||||
#if RIPPLE_ENABLE_MULTI_SIGN
|
||||
{ "submit_multisigned", &RPCParser::parseSubmitMultiSigned, 1, 1 },
|
||||
#endif // RIPPLE_ENABLE_MULTI_SIGN
|
||||
{ "server_info", &RPCParser::parseAsIs, 0, 0 },
|
||||
{ "server_state", &RPCParser::parseAsIs, 0, 0 },
|
||||
{ "stop", &RPCParser::parseAsIs, 0, 0 },
|
||||
|
||||
Reference in New Issue
Block a user