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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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