Remove not needed clang-format off comments

Can be reviewed with --word-diff-regex=. --ignore-all-space
This commit is contained in:
MarcoFalke 2022-04-24 16:44:35 +02:00
parent b1c5991eeb
commit fa870e3d4c
No known key found for this signature in database
GPG key ID: CE2B75697E69A548
11 changed files with 175 additions and 221 deletions

View file

@ -2371,44 +2371,36 @@ UniValue CreateUTXOSnapshot(
return result; return result;
} }
void RegisterBlockchainRPCCommands(CRPCTable& t) void RegisterBlockchainRPCCommands(CRPCTable& t)
{ {
// clang-format off static const CRPCCommand commands[]{
static const CRPCCommand commands[] = {"blockchain", &getblockchaininfo},
{ // category actor (function) {"blockchain", &getchaintxstats},
// --------------------- ------------------------ {"blockchain", &getblockstats},
{ "blockchain", &getblockchaininfo, }, {"blockchain", &getbestblockhash},
{ "blockchain", &getchaintxstats, }, {"blockchain", &getblockcount},
{ "blockchain", &getblockstats, }, {"blockchain", &getblock},
{ "blockchain", &getbestblockhash, }, {"blockchain", &getblockfrompeer},
{ "blockchain", &getblockcount, }, {"blockchain", &getblockhash},
{ "blockchain", &getblock, }, {"blockchain", &getblockheader},
{ "blockchain", &getblockfrompeer, }, {"blockchain", &getchaintips},
{ "blockchain", &getblockhash, }, {"blockchain", &getdifficulty},
{ "blockchain", &getblockheader, }, {"blockchain", &getdeploymentinfo},
{ "blockchain", &getchaintips, }, {"blockchain", &gettxout},
{ "blockchain", &getdifficulty, }, {"blockchain", &gettxoutsetinfo},
{ "blockchain", &getdeploymentinfo, }, {"blockchain", &pruneblockchain},
{ "blockchain", &gettxout, }, {"blockchain", &verifychain},
{ "blockchain", &gettxoutsetinfo, }, {"blockchain", &preciousblock},
{ "blockchain", &pruneblockchain, }, {"blockchain", &scantxoutset},
{ "blockchain", &verifychain, }, {"blockchain", &getblockfilter},
{"hidden", &invalidateblock},
{ "blockchain", &preciousblock, }, {"hidden", &reconsiderblock},
{ "blockchain", &scantxoutset, }, {"hidden", &waitfornewblock},
{ "blockchain", &getblockfilter, }, {"hidden", &waitforblock},
{"hidden", &waitforblockheight},
/* Not shown in help */ {"hidden", &syncwithvalidationinterfacequeue},
{ "hidden", &invalidateblock, }, {"hidden", &dumptxoutset},
{ "hidden", &reconsiderblock, },
{ "hidden", &waitfornewblock, },
{ "hidden", &waitforblock, },
{ "hidden", &waitforblockheight, },
{ "hidden", &syncwithvalidationinterfacequeue, },
{ "hidden", &dumptxoutset, },
}; };
// clang-format on
for (const auto& c : commands) { for (const auto& c : commands) {
t.appendCommand(c.name, &c); t.appendCommand(c.name, &c);
} }

View file

@ -64,13 +64,9 @@ static RPCHelpMan enumeratesigners()
void RegisterSignerRPCCommands(CRPCTable& t) void RegisterSignerRPCCommands(CRPCTable& t)
{ {
// clang-format off static const CRPCCommand commands[]{
static const CRPCCommand commands[] = {"signer", &enumeratesigners},
{ // category actor (function)
// --------------------- ------------------------
{ "signer", &enumeratesigners, },
}; };
// clang-format on
for (const auto& c : commands) { for (const auto& c : commands) {
t.appendCommand(c.name, &c); t.appendCommand(c.name, &c);
} }

View file

@ -672,8 +672,6 @@ static RPCHelpMan savemempool()
void RegisterMempoolRPCCommands(CRPCTable& t) void RegisterMempoolRPCCommands(CRPCTable& t)
{ {
static const CRPCCommand commands[]{ static const CRPCCommand commands[]{
// category actor (function)
// -------- ----------------
{"rawtransactions", &sendrawtransaction}, {"rawtransactions", &sendrawtransaction},
{"rawtransactions", &testmempoolaccept}, {"rawtransactions", &testmempoolaccept},
{"blockchain", &getmempoolancestors}, {"blockchain", &getmempoolancestors},

View file

@ -1251,28 +1251,23 @@ static RPCHelpMan estimaterawfee()
void RegisterMiningRPCCommands(CRPCTable& t) void RegisterMiningRPCCommands(CRPCTable& t)
{ {
// clang-format off static const CRPCCommand commands[]{
static const CRPCCommand commands[] = {"mining", &getnetworkhashps},
{ // category actor (function) {"mining", &getmininginfo},
// --------------------- ----------------------- {"mining", &prioritisetransaction},
{ "mining", &getnetworkhashps, }, {"mining", &getblocktemplate},
{ "mining", &getmininginfo, }, {"mining", &submitblock},
{ "mining", &prioritisetransaction, }, {"mining", &submitheader},
{ "mining", &getblocktemplate, },
{ "mining", &submitblock, },
{ "mining", &submitheader, },
{"hidden", &generatetoaddress},
{"hidden", &generatetodescriptor},
{"hidden", &generateblock},
{ "hidden", &generatetoaddress, }, {"util", &estimatesmartfee},
{ "hidden", &generatetodescriptor, },
{ "hidden", &generateblock, },
{ "util", &estimatesmartfee, }, {"hidden", &estimaterawfee},
{"hidden", &generate},
{ "hidden", &estimaterawfee, },
{ "hidden", &generate, },
}; };
// clang-format on
for (const auto& c : commands) { for (const auto& c : commands) {
t.appendCommand(c.name, &c); t.appendCommand(c.name, &c);
} }

View file

@ -792,31 +792,25 @@ static RPCHelpMan getindexinfo()
void RegisterMiscRPCCommands(CRPCTable& t) void RegisterMiscRPCCommands(CRPCTable& t)
{ {
// clang-format off static const CRPCCommand commands[]{
static const CRPCCommand commands[] = {"control", &getmemoryinfo},
{ // category actor (function) {"control", &logging},
// --------------------- ------------------------ {"util", &validateaddress},
{ "control", &getmemoryinfo, }, {"util", &createmultisig},
{ "control", &logging, }, {"util", &deriveaddresses},
{ "util", &validateaddress, }, {"util", &getdescriptorinfo},
{ "util", &createmultisig, }, {"util", &verifymessage},
{ "util", &deriveaddresses, }, {"util", &signmessagewithprivkey},
{ "util", &getdescriptorinfo, }, {"util", &getindexinfo},
{ "util", &verifymessage, }, {"hidden", &setmocktime},
{ "util", &signmessagewithprivkey, }, {"hidden", &mockscheduler},
{ "util", &getindexinfo, }, {"hidden", &echo},
{"hidden", &echojson},
/* Not shown in help */ {"hidden", &echoipc},
{ "hidden", &setmocktime, },
{ "hidden", &mockscheduler, },
{ "hidden", &echo, },
{ "hidden", &echojson, },
{ "hidden", &echoipc, },
#if defined(USE_SYSCALL_SANDBOX) #if defined(USE_SYSCALL_SANDBOX)
{ "hidden", &invokedisallowedsyscall, }, {"hidden", &invokedisallowedsyscall},
#endif // USE_SYSCALL_SANDBOX #endif // USE_SYSCALL_SANDBOX
}; };
// clang-format on
for (const auto& c : commands) { for (const auto& c : commands) {
t.appendCommand(c.name, &c); t.appendCommand(c.name, &c);
} }

View file

@ -961,28 +961,23 @@ static RPCHelpMan addpeeraddress()
void RegisterNetRPCCommands(CRPCTable& t) void RegisterNetRPCCommands(CRPCTable& t)
{ {
// clang-format off static const CRPCCommand commands[]{
static const CRPCCommand commands[] = {"network", &getconnectioncount},
{ // category actor {"network", &ping},
// --------------------- ----------------------- {"network", &getpeerinfo},
{ "network", &getconnectioncount, }, {"network", &addnode},
{ "network", &ping, }, {"network", &disconnectnode},
{ "network", &getpeerinfo, }, {"network", &getaddednodeinfo},
{ "network", &addnode, }, {"network", &getnettotals},
{ "network", &disconnectnode, }, {"network", &getnetworkinfo},
{ "network", &getaddednodeinfo, }, {"network", &setban},
{ "network", &getnettotals, }, {"network", &listbanned},
{ "network", &getnetworkinfo, }, {"network", &clearbanned},
{ "network", &setban, }, {"network", &setnetworkactive},
{ "network", &listbanned, }, {"network", &getnodeaddresses},
{ "network", &clearbanned, }, {"hidden", &addconnection},
{ "network", &setnetworkactive, }, {"hidden", &addpeeraddress},
{ "network", &getnodeaddresses, },
{ "hidden", &addconnection, },
{ "hidden", &addpeeraddress, },
}; };
// clang-format on
for (const auto& c : commands) { for (const auto& c : commands) {
t.appendCommand(c.name, &c); t.appendCommand(c.name, &c);
} }

View file

@ -1682,26 +1682,22 @@ static RPCHelpMan analyzepsbt()
void RegisterRawTransactionRPCCommands(CRPCTable& t) void RegisterRawTransactionRPCCommands(CRPCTable& t)
{ {
// clang-format off static const CRPCCommand commands[]{
static const CRPCCommand commands[] = {"rawtransactions", &getrawtransaction},
{ // category actor (function) {"rawtransactions", &createrawtransaction},
// --------------------- ----------------------- {"rawtransactions", &decoderawtransaction},
{ "rawtransactions", &getrawtransaction, }, {"rawtransactions", &decodescript},
{ "rawtransactions", &createrawtransaction, }, {"rawtransactions", &combinerawtransaction},
{ "rawtransactions", &decoderawtransaction, }, {"rawtransactions", &signrawtransactionwithkey},
{ "rawtransactions", &decodescript, }, {"rawtransactions", &decodepsbt},
{ "rawtransactions", &combinerawtransaction, }, {"rawtransactions", &combinepsbt},
{ "rawtransactions", &signrawtransactionwithkey, }, {"rawtransactions", &finalizepsbt},
{ "rawtransactions", &decodepsbt, }, {"rawtransactions", &createpsbt},
{ "rawtransactions", &combinepsbt, }, {"rawtransactions", &converttopsbt},
{ "rawtransactions", &finalizepsbt, }, {"rawtransactions", &utxoupdatepsbt},
{ "rawtransactions", &createpsbt, }, {"rawtransactions", &joinpsbts},
{ "rawtransactions", &converttopsbt, }, {"rawtransactions", &analyzepsbt},
{ "rawtransactions", &utxoupdatepsbt, },
{ "rawtransactions", &joinpsbts, },
{ "rawtransactions", &analyzepsbt, },
}; };
// clang-format on
for (const auto& c : commands) { for (const auto& c : commands) {
t.appendCommand(c.name, &c); t.appendCommand(c.name, &c);
} }

View file

@ -248,17 +248,13 @@ static RPCHelpMan getrpcinfo()
}; };
} }
// clang-format off static const CRPCCommand vRPCCommands[]{
static const CRPCCommand vRPCCommands[] =
{ // category actor (function)
// --------------------- -----------------------
/* Overall control/query calls */ /* Overall control/query calls */
{ "control", &getrpcinfo, }, {"control", &getrpcinfo},
{ "control", &help, }, {"control", &help},
{ "control", &stop, }, {"control", &stop},
{ "control", &uptime, }, {"control", &uptime},
}; };
// clang-format on
CRPCTable::CRPCTable() CRPCTable::CRPCTable()
{ {

View file

@ -172,8 +172,6 @@ static RPCHelpMan verifytxoutproof()
void RegisterTxoutProofRPCCommands(CRPCTable& t) void RegisterTxoutProofRPCCommands(CRPCTable& t)
{ {
static const CRPCCommand commands[]{ static const CRPCCommand commands[]{
// category actor (function)
// -------- ----------------
{"blockchain", &gettxoutproof}, {"blockchain", &gettxoutproof},
{"blockchain", &verifytxoutproof}, {"blockchain", &verifytxoutproof},
}; };

View file

@ -664,79 +664,75 @@ RPCHelpMan abortrescan();
Span<const CRPCCommand> GetWalletRPCCommands() Span<const CRPCCommand> GetWalletRPCCommands()
{ {
// clang-format off static const CRPCCommand commands[]{
static const CRPCCommand commands[] = {"rawtransactions", &fundrawtransaction},
{ // category actor (function) {"wallet", &abandontransaction},
// ------------------ ------------------------ {"wallet", &abortrescan},
{ "rawtransactions", &fundrawtransaction, }, {"wallet", &addmultisigaddress},
{ "wallet", &abandontransaction, }, {"wallet", &backupwallet},
{ "wallet", &abortrescan, }, {"wallet", &bumpfee},
{ "wallet", &addmultisigaddress, }, {"wallet", &psbtbumpfee},
{ "wallet", &backupwallet, }, {"wallet", &createwallet},
{ "wallet", &bumpfee, }, {"wallet", &restorewallet},
{ "wallet", &psbtbumpfee, }, {"wallet", &dumpprivkey},
{ "wallet", &createwallet, }, {"wallet", &dumpwallet},
{ "wallet", &restorewallet, }, {"wallet", &encryptwallet},
{ "wallet", &dumpprivkey, }, {"wallet", &getaddressesbylabel},
{ "wallet", &dumpwallet, }, {"wallet", &getaddressinfo},
{ "wallet", &encryptwallet, }, {"wallet", &getbalance},
{ "wallet", &getaddressesbylabel, }, {"wallet", &getnewaddress},
{ "wallet", &getaddressinfo, }, {"wallet", &getrawchangeaddress},
{ "wallet", &getbalance, }, {"wallet", &getreceivedbyaddress},
{ "wallet", &getnewaddress, }, {"wallet", &getreceivedbylabel},
{ "wallet", &getrawchangeaddress, }, {"wallet", &gettransaction},
{ "wallet", &getreceivedbyaddress, }, {"wallet", &getunconfirmedbalance},
{ "wallet", &getreceivedbylabel, }, {"wallet", &getbalances},
{ "wallet", &gettransaction, }, {"wallet", &getwalletinfo},
{ "wallet", &getunconfirmedbalance, }, {"wallet", &importaddress},
{ "wallet", &getbalances, }, {"wallet", &importdescriptors},
{ "wallet", &getwalletinfo, }, {"wallet", &importmulti},
{ "wallet", &importaddress, }, {"wallet", &importprivkey},
{ "wallet", &importdescriptors, }, {"wallet", &importprunedfunds},
{ "wallet", &importmulti, }, {"wallet", &importpubkey},
{ "wallet", &importprivkey, }, {"wallet", &importwallet},
{ "wallet", &importprunedfunds, }, {"wallet", &keypoolrefill},
{ "wallet", &importpubkey, }, {"wallet", &listaddressgroupings},
{ "wallet", &importwallet, }, {"wallet", &listdescriptors},
{ "wallet", &keypoolrefill, }, {"wallet", &listlabels},
{ "wallet", &listaddressgroupings, }, {"wallet", &listlockunspent},
{ "wallet", &listdescriptors, }, {"wallet", &listreceivedbyaddress},
{ "wallet", &listlabels, }, {"wallet", &listreceivedbylabel},
{ "wallet", &listlockunspent, }, {"wallet", &listsinceblock},
{ "wallet", &listreceivedbyaddress, }, {"wallet", &listtransactions},
{ "wallet", &listreceivedbylabel, }, {"wallet", &listunspent},
{ "wallet", &listsinceblock, }, {"wallet", &listwalletdir},
{ "wallet", &listtransactions, }, {"wallet", &listwallets},
{ "wallet", &listunspent, }, {"wallet", &loadwallet},
{ "wallet", &listwalletdir, }, {"wallet", &lockunspent},
{ "wallet", &listwallets, }, {"wallet", &newkeypool},
{ "wallet", &loadwallet, }, {"wallet", &removeprunedfunds},
{ "wallet", &lockunspent, }, {"wallet", &rescanblockchain},
{ "wallet", &newkeypool, }, {"wallet", &send},
{ "wallet", &removeprunedfunds, }, {"wallet", &sendmany},
{ "wallet", &rescanblockchain, }, {"wallet", &sendtoaddress},
{ "wallet", &send, }, {"wallet", &sethdseed},
{ "wallet", &sendmany, }, {"wallet", &setlabel},
{ "wallet", &sendtoaddress, }, {"wallet", &settxfee},
{ "wallet", &sethdseed, }, {"wallet", &setwalletflag},
{ "wallet", &setlabel, }, {"wallet", &signmessage},
{ "wallet", &settxfee, }, {"wallet", &signrawtransactionwithwallet},
{ "wallet", &setwalletflag, }, {"wallet", &sendall},
{ "wallet", &signmessage, }, {"wallet", &unloadwallet},
{ "wallet", &signrawtransactionwithwallet, }, {"wallet", &upgradewallet},
{ "wallet", &sendall, }, {"wallet", &walletcreatefundedpsbt},
{ "wallet", &unloadwallet, },
{ "wallet", &upgradewallet, },
{ "wallet", &walletcreatefundedpsbt, },
#ifdef ENABLE_EXTERNAL_SIGNER #ifdef ENABLE_EXTERNAL_SIGNER
{ "wallet", &walletdisplayaddress, }, {"wallet", &walletdisplayaddress},
#endif // ENABLE_EXTERNAL_SIGNER #endif // ENABLE_EXTERNAL_SIGNER
{ "wallet", &walletlock, }, {"wallet", &walletlock},
{ "wallet", &walletpassphrase, }, {"wallet", &walletpassphrase},
{ "wallet", &walletpassphrasechange, }, {"wallet", &walletpassphrasechange},
{ "wallet", &walletprocesspsbt, }, {"wallet", &walletprocesspsbt},
}; };
// clang-format on
return commands; return commands;
} }
} // namespace wallet } // namespace wallet

View file

@ -51,10 +51,8 @@ static RPCHelpMan getzmqnotifications()
}; };
} }
const CRPCCommand commands[] = const CRPCCommand commands[]{
{ // category actor (function) {"zmq", &getzmqnotifications},
// ----------------- -----------------------
{ "zmq", &getzmqnotifications, },
}; };
} // anonymous namespace } // anonymous namespace