mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Merge #14008: Preserve a format of RPC command definitions
d9d79576f423cd9c5cef4547c7e3648dbb339460 Preserve a format of RPC command definitions (Kostiantyn Stepaniuk) Pull request description: 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. Tree-SHA512: e17d20ec0e6c4e19410198b55687ebbe6fa01654d214d4578cd16c00b872bf8b0b306594a45523685cd2e9d9280702e00471d9366e87954428e8bbeacd8cad60
This commit is contained in:
parent
ea750966f9
commit
2833db6e0b
@ -2570,6 +2570,7 @@ static UniValue getblockfilter(const JSONRPCRequest& request)
|
||||
return ret;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
@ -2611,6 +2612,7 @@ static const CRPCCommand commands[] =
|
||||
{ "hidden", "waitforblockheight", &waitforblockheight, {"height","timeout"} },
|
||||
{ "hidden", "syncwithvalidationinterfacequeue", &syncwithvalidationinterfacequeue, {} },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
void RegisterBlockchainRPCCommands(CRPCTable &t)
|
||||
{
|
||||
|
@ -19,6 +19,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.
|
||||
@ -192,6 +193,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
|
||||
{ "getnodeaddresses", 0, "count"},
|
||||
{ "stop", 0, "wait" },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
class CRPCConvertTable
|
||||
{
|
||||
|
@ -160,7 +160,7 @@ static UniValue getcoinjoininfo(const JSONRPCRequest& request)
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ---------------------------------
|
||||
@ -170,7 +170,7 @@ static const CRPCCommand commands[] =
|
||||
{ "dash", "coinjoin", &coinjoin, {} },
|
||||
#endif // ENABLE_WALLET
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
void RegisterCoinJoinRPCCommands(CRPCTable &t)
|
||||
{
|
||||
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)
|
||||
|
@ -1162,7 +1162,7 @@ static UniValue getsuperblockbudget(const JSONRPCRequest& request)
|
||||
|
||||
return ValueFromAmount(CSuperblock::GetPaymentsLimit(nBlockHeight));
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
@ -1173,7 +1173,7 @@ static const CRPCCommand commands[] =
|
||||
{ "dash", "voteraw", &voteraw, {"tx_hash","tx_index","gov_hash","signal","outcome","time","sig"} },
|
||||
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
void RegisterGovernanceRPCCommands(CRPCTable &t)
|
||||
{
|
||||
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)
|
||||
|
@ -694,14 +694,14 @@ static UniValue masternodelist(const JSONRPCRequest& request)
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
{ "dash", "masternode", &masternode, {} },
|
||||
{ "dash", "masternodelist", &masternodelist, {} },
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
void RegisterMasternodeRPCCommands(CRPCTable &t)
|
||||
{
|
||||
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)
|
||||
|
@ -971,6 +971,7 @@ static UniValue estimaterawfee(const JSONRPCRequest& request)
|
||||
return result;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
@ -991,6 +992,7 @@ static const CRPCCommand commands[] =
|
||||
|
||||
{ "hidden", "estimaterawfee", &estimaterawfee, {"conf_target", "threshold"} },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
void RegisterMiningRPCCommands(CRPCTable &t)
|
||||
{
|
||||
|
@ -1110,6 +1110,7 @@ static UniValue echo(const JSONRPCRequest& request)
|
||||
return request.params;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
@ -1139,6 +1140,7 @@ static const CRPCCommand commands[] =
|
||||
{ "hidden", "echojson", &echo, {"arg0","arg1","arg2","arg3","arg4","arg5","arg6","arg7","arg8","arg9"}},
|
||||
{ "hidden", "mnauth", &mnauth, {"nodeId", "proTxHash", "publicKey"}},
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
void RegisterMiscRPCCommands(CRPCTable &t)
|
||||
{
|
||||
|
@ -756,6 +756,7 @@ static UniValue getnodeaddresses(const JSONRPCRequest& request)
|
||||
return ret;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
@ -773,6 +774,7 @@ static const CRPCCommand commands[] =
|
||||
{ "network", "setnetworkactive", &setnetworkactive, {"state"} },
|
||||
{ "network", "getnodeaddresses", &getnodeaddresses, {"count"} },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
void RegisterNetRPCCommands(CRPCTable &t)
|
||||
{
|
||||
|
@ -1641,6 +1641,7 @@ UniValue converttopsbt(const JSONRPCRequest& request)
|
||||
return EncodeBase64(ssTx.str());
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
@ -1662,6 +1663,7 @@ static const CRPCCommand commands[] =
|
||||
{ "blockchain", "gettxoutproof", &gettxoutproof, {"txids", "blockhash"} },
|
||||
{ "blockchain", "verifytxoutproof", &verifytxoutproof, {"proof"} },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
void RegisterRawTransactionRPCCommands(CRPCTable &t)
|
||||
{
|
||||
|
@ -1287,14 +1287,14 @@ static UniValue _bls(const JSONRPCRequest& request)
|
||||
bls_help();
|
||||
}
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function)
|
||||
// --------------------- ------------------------ -----------------------
|
||||
{ "evo", "bls", &_bls, {} },
|
||||
{ "evo", "protx", &protx, {} },
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
void RegisterEvoRPCCommands(CRPCTable &tableRPC)
|
||||
{
|
||||
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++) {
|
||||
|
@ -753,7 +753,7 @@ static UniValue verifyislock(const JSONRPCRequest& request)
|
||||
return llmq::quorumSigningManager->VerifyRecoveredSig(llmqType, signHeight, id, txid, sig, 0) ||
|
||||
llmq::quorumSigningManager->VerifyRecoveredSig(llmqType, signHeight, id, txid, sig, signOffset);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function)
|
||||
// --------------------- ------------------------ -----------------------
|
||||
@ -761,7 +761,7 @@ static const CRPCCommand commands[] =
|
||||
{ "evo", "verifychainlock", &verifychainlock, {"blockHash", "signature", "blockHeight"} },
|
||||
{ "evo", "verifyislock", &verifyislock, {"id", "txid", "signature", "maxHeight"} },
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
void RegisterQuorumsRPCCommands(CRPCTable &tableRPC)
|
||||
{
|
||||
for (unsigned int vcidx = 0; vcidx < ARRAYLEN(commands); vcidx++)
|
||||
|
@ -330,6 +330,7 @@ static UniValue uptime(const JSONRPCRequest& jsonRequest)
|
||||
return GetTime() - GetStartupTime();
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
/**
|
||||
* Call Table
|
||||
*/
|
||||
@ -341,6 +342,7 @@ static const CRPCCommand vRPCCommands[] =
|
||||
{ "control", "stop", &stop, {"wait"} },
|
||||
{ "control", "uptime", &uptime, {} },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
CRPCTable::CRPCTable()
|
||||
{
|
||||
|
@ -4102,6 +4102,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
|
||||
return result;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static const CRPCCommand commands[] =
|
||||
{ // category name actor (function) argNames
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
@ -4172,6 +4173,7 @@ static const CRPCCommand commands[] =
|
||||
{ "wallet", "walletprocesspsbt", &walletprocesspsbt, {"psbt","sign","sighashtype","bip32derivs"} },
|
||||
{ "wallet", "walletcreatefundedpsbt", &walletcreatefundedpsbt, {"inputs","outputs","locktime","options","bip32derivs"} },
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
void RegisterWalletRPCCommands(CRPCTable &t)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user