Preserve a format of RPC command definitions
Currently RPC commands are formatted in a way that it's easy to read and that test/lint/check-rpc-mappings.py can parse it. To void breaking test/lint/check-rpc-mappings.py script by running clang-format, RPC command definitions should be disabled for clang-format.
This commit is contained in:
parent
2a583406c0
commit
d9d79576f4
9 changed files with 18 additions and 2 deletions
|
@ -285,8 +285,8 @@ public:
|
|||
* Note that lightweight clients may not know anything besides the hash of previous transactions,
|
||||
* so may not be able to calculate this.
|
||||
*
|
||||
* @param[in] tx transaction for which we are checking input total
|
||||
* @return Sum of value of all inputs (scriptSigs)
|
||||
* @param[in] tx transaction for which we are checking input total
|
||||
* @return Sum of value of all inputs (scriptSigs)
|
||||
*/
|
||||
CAmount GetValueIn(const CTransaction& tx) const;
|
||||
|
||||
|
|
|
@ -2179,6 +2179,7 @@ UniValue scantxoutset(const JSONRPCRequest& request)
|
|||
return result;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
|
@ -2214,6 +2215,7 @@ static const CRPCCommand commands[] =
|
|||
{ "hidden", "waitforblockheight", &waitforblockheight, {"height","timeout"} },
|
||||
{ "hidden", "syncwithvalidationinterfacequeue", &syncwithvalidationinterfacequeue, {} },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
void RegisterBlockchainRPCCommands(CRPCTable &t)
|
||||
{
|
||||
|
|
|
@ -18,6 +18,7 @@ public:
|
|||
std::string paramName; //!< parameter name
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
/**
|
||||
* Specify a (method, idx, name) here if the argument is a non-string RPC
|
||||
* argument and needs to be converted from JSON.
|
||||
|
@ -174,6 +175,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
|
|||
{ "rescanblockchain", 1, "stop_height"},
|
||||
{ "createwallet", 1, "disable_private_keys"},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
class CRPCConvertTable
|
||||
{
|
||||
|
|
|
@ -968,6 +968,7 @@ static UniValue estimaterawfee(const JSONRPCRequest& request)
|
|||
return result;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
|
@ -986,6 +987,7 @@ static const CRPCCommand commands[] =
|
|||
|
||||
{ "hidden", "estimaterawfee", &estimaterawfee, {"conf_target", "threshold"} },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
void RegisterMiningRPCCommands(CRPCTable &t)
|
||||
{
|
||||
|
|
|
@ -456,6 +456,7 @@ static UniValue echo(const JSONRPCRequest& request)
|
|||
return request.params;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
|
@ -471,6 +472,7 @@ static const CRPCCommand commands[] =
|
|||
{ "hidden", "echo", &echo, {"arg0","arg1","arg2","arg3","arg4","arg5","arg6","arg7","arg8","arg9"}},
|
||||
{ "hidden", "echojson", &echo, {"arg0","arg1","arg2","arg3","arg4","arg5","arg6","arg7","arg8","arg9"}},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
void RegisterMiscRPCCommands(CRPCTable &t)
|
||||
{
|
||||
|
|
|
@ -624,6 +624,7 @@ static UniValue setnetworkactive(const JSONRPCRequest& request)
|
|||
return g_connman->GetNetworkActive();
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
|
@ -640,6 +641,7 @@ static const CRPCCommand commands[] =
|
|||
{ "network", "clearbanned", &clearbanned, {} },
|
||||
{ "network", "setnetworkactive", &setnetworkactive, {"state"} },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
void RegisterNetRPCCommands(CRPCTable &t)
|
||||
{
|
||||
|
|
|
@ -1801,6 +1801,7 @@ UniValue converttopsbt(const JSONRPCRequest& request)
|
|||
return EncodeBase64((unsigned char*)ssTx.data(), ssTx.size());
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
|
@ -1822,6 +1823,7 @@ static const CRPCCommand commands[] =
|
|||
{ "blockchain", "gettxoutproof", &gettxoutproof, {"txids", "blockhash"} },
|
||||
{ "blockchain", "verifytxoutproof", &verifytxoutproof, {"proof"} },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
void RegisterRawTransactionRPCCommands(CRPCTable &t)
|
||||
{
|
||||
|
|
|
@ -255,6 +255,7 @@ static UniValue uptime(const JSONRPCRequest& jsonRequest)
|
|||
return GetTime() - GetStartupTime();
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
/**
|
||||
* Call Table
|
||||
*/
|
||||
|
@ -266,6 +267,7 @@ static const CRPCCommand vRPCCommands[] =
|
|||
{ "control", "stop", &stop, {} },
|
||||
{ "control", "uptime", &uptime, {} },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
CRPCTable::CRPCTable()
|
||||
{
|
||||
|
|
|
@ -4760,6 +4760,7 @@ UniValue importprunedfunds(const JSONRPCRequest& request);
|
|||
UniValue removeprunedfunds(const JSONRPCRequest& request);
|
||||
UniValue importmulti(const JSONRPCRequest& request);
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
|
@ -4834,6 +4835,7 @@ static const CRPCCommand commands[] =
|
|||
|
||||
{ "generating", "generate", &generate, {"nblocks","maxtries"} },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
void RegisterWalletRPCCommands(CRPCTable &t)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue