Skip to content

Commit 23ebd7a

Browse files
committed
Merge bitcoin/bitcoin#24959: Remove not needed clang-format off comments
fa870e3 Remove not needed clang-format off comments (MarcoFalke) Pull request description: It seems odd to disable clang-format and force manual formatting when there is no need for it. So remove the clang-format comments and other unneeded comments. Can be reviewed with `--word-diff-regex=. --ignore-all-space` Looks like this was initially added in commit d9d7957 to accommodate a linter that has since been removed and replaced by a functional test. ACKs for top commit: laanwj: Code review ACK fa870e3 fanquake: ACK fa870e3 Tree-SHA512: 0f8f97c12f5dbe517dd96c10b10ce1b8772d8daed33e6b41f73ea1040e89888cf3b8c0ad7b20319e366fe30c71e8b181c89098ae7f6a3deb8647e1b4731db815
2 parents 269dcad + fa870e3 commit 23ebd7a

File tree

11 files changed

+180
-226
lines changed

11 files changed

+180
-226
lines changed

src/rpc/blockchain.cpp

Lines changed: 30 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2371,44 +2371,36 @@ UniValue CreateUTXOSnapshot(
23712371
return result;
23722372
}
23732373

2374-
2375-
void RegisterBlockchainRPCCommands(CRPCTable &t)
2376-
{
2377-
// clang-format off
2378-
static const CRPCCommand commands[] =
2379-
{ // category actor (function)
2380-
// --------------------- ------------------------
2381-
{ "blockchain", &getblockchaininfo, },
2382-
{ "blockchain", &getchaintxstats, },
2383-
{ "blockchain", &getblockstats, },
2384-
{ "blockchain", &getbestblockhash, },
2385-
{ "blockchain", &getblockcount, },
2386-
{ "blockchain", &getblock, },
2387-
{ "blockchain", &getblockfrompeer, },
2388-
{ "blockchain", &getblockhash, },
2389-
{ "blockchain", &getblockheader, },
2390-
{ "blockchain", &getchaintips, },
2391-
{ "blockchain", &getdifficulty, },
2392-
{ "blockchain", &getdeploymentinfo, },
2393-
{ "blockchain", &gettxout, },
2394-
{ "blockchain", &gettxoutsetinfo, },
2395-
{ "blockchain", &pruneblockchain, },
2396-
{ "blockchain", &verifychain, },
2397-
2398-
{ "blockchain", &preciousblock, },
2399-
{ "blockchain", &scantxoutset, },
2400-
{ "blockchain", &getblockfilter, },
2401-
2402-
/* Not shown in help */
2403-
{ "hidden", &invalidateblock, },
2404-
{ "hidden", &reconsiderblock, },
2405-
{ "hidden", &waitfornewblock, },
2406-
{ "hidden", &waitforblock, },
2407-
{ "hidden", &waitforblockheight, },
2408-
{ "hidden", &syncwithvalidationinterfacequeue, },
2409-
{ "hidden", &dumptxoutset, },
2410-
};
2411-
// clang-format on
2374+
void RegisterBlockchainRPCCommands(CRPCTable& t)
2375+
{
2376+
static const CRPCCommand commands[]{
2377+
{"blockchain", &getblockchaininfo},
2378+
{"blockchain", &getchaintxstats},
2379+
{"blockchain", &getblockstats},
2380+
{"blockchain", &getbestblockhash},
2381+
{"blockchain", &getblockcount},
2382+
{"blockchain", &getblock},
2383+
{"blockchain", &getblockfrompeer},
2384+
{"blockchain", &getblockhash},
2385+
{"blockchain", &getblockheader},
2386+
{"blockchain", &getchaintips},
2387+
{"blockchain", &getdifficulty},
2388+
{"blockchain", &getdeploymentinfo},
2389+
{"blockchain", &gettxout},
2390+
{"blockchain", &gettxoutsetinfo},
2391+
{"blockchain", &pruneblockchain},
2392+
{"blockchain", &verifychain},
2393+
{"blockchain", &preciousblock},
2394+
{"blockchain", &scantxoutset},
2395+
{"blockchain", &getblockfilter},
2396+
{"hidden", &invalidateblock},
2397+
{"hidden", &reconsiderblock},
2398+
{"hidden", &waitfornewblock},
2399+
{"hidden", &waitforblock},
2400+
{"hidden", &waitforblockheight},
2401+
{"hidden", &syncwithvalidationinterfacequeue},
2402+
{"hidden", &dumptxoutset},
2403+
};
24122404
for (const auto& c : commands) {
24132405
t.appendCommand(c.name, &c);
24142406
}

src/rpc/external_signer.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,11 @@ static RPCHelpMan enumeratesigners()
6262
};
6363
}
6464

65-
void RegisterSignerRPCCommands(CRPCTable &t)
65+
void RegisterSignerRPCCommands(CRPCTable& t)
6666
{
67-
// clang-format off
68-
static const CRPCCommand commands[] =
69-
{ // category actor (function)
70-
// --------------------- ------------------------
71-
{ "signer", &enumeratesigners, },
72-
};
73-
// clang-format on
67+
static const CRPCCommand commands[]{
68+
{"signer", &enumeratesigners},
69+
};
7470
for (const auto& c : commands) {
7571
t.appendCommand(c.name, &c);
7672
}

src/rpc/mempool.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,6 @@ static RPCHelpMan savemempool()
672672
void RegisterMempoolRPCCommands(CRPCTable& t)
673673
{
674674
static const CRPCCommand commands[]{
675-
// category actor (function)
676-
// -------- ----------------
677675
{"rawtransactions", &sendrawtransaction},
678676
{"rawtransactions", &testmempoolaccept},
679677
{"blockchain", &getmempoolancestors},

src/rpc/mining.cpp

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,30 +1249,25 @@ static RPCHelpMan estimaterawfee()
12491249
};
12501250
}
12511251

1252-
void RegisterMiningRPCCommands(CRPCTable &t)
1252+
void RegisterMiningRPCCommands(CRPCTable& t)
12531253
{
1254-
// clang-format off
1255-
static const CRPCCommand commands[] =
1256-
{ // category actor (function)
1257-
// --------------------- -----------------------
1258-
{ "mining", &getnetworkhashps, },
1259-
{ "mining", &getmininginfo, },
1260-
{ "mining", &prioritisetransaction, },
1261-
{ "mining", &getblocktemplate, },
1262-
{ "mining", &submitblock, },
1263-
{ "mining", &submitheader, },
1264-
1265-
1266-
{ "hidden", &generatetoaddress, },
1267-
{ "hidden", &generatetodescriptor, },
1268-
{ "hidden", &generateblock, },
1269-
1270-
{ "util", &estimatesmartfee, },
1271-
1272-
{ "hidden", &estimaterawfee, },
1273-
{ "hidden", &generate, },
1274-
};
1275-
// clang-format on
1254+
static const CRPCCommand commands[]{
1255+
{"mining", &getnetworkhashps},
1256+
{"mining", &getmininginfo},
1257+
{"mining", &prioritisetransaction},
1258+
{"mining", &getblocktemplate},
1259+
{"mining", &submitblock},
1260+
{"mining", &submitheader},
1261+
1262+
{"hidden", &generatetoaddress},
1263+
{"hidden", &generatetodescriptor},
1264+
{"hidden", &generateblock},
1265+
1266+
{"util", &estimatesmartfee},
1267+
1268+
{"hidden", &estimaterawfee},
1269+
{"hidden", &generate},
1270+
};
12761271
for (const auto& c : commands) {
12771272
t.appendCommand(c.name, &c);
12781273
}

src/rpc/misc.cpp

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -790,33 +790,27 @@ static RPCHelpMan getindexinfo()
790790
};
791791
}
792792

793-
void RegisterMiscRPCCommands(CRPCTable &t)
793+
void RegisterMiscRPCCommands(CRPCTable& t)
794794
{
795-
// clang-format off
796-
static const CRPCCommand commands[] =
797-
{ // category actor (function)
798-
// --------------------- ------------------------
799-
{ "control", &getmemoryinfo, },
800-
{ "control", &logging, },
801-
{ "util", &validateaddress, },
802-
{ "util", &createmultisig, },
803-
{ "util", &deriveaddresses, },
804-
{ "util", &getdescriptorinfo, },
805-
{ "util", &verifymessage, },
806-
{ "util", &signmessagewithprivkey, },
807-
{ "util", &getindexinfo, },
808-
809-
/* Not shown in help */
810-
{ "hidden", &setmocktime, },
811-
{ "hidden", &mockscheduler, },
812-
{ "hidden", &echo, },
813-
{ "hidden", &echojson, },
814-
{ "hidden", &echoipc, },
795+
static const CRPCCommand commands[]{
796+
{"control", &getmemoryinfo},
797+
{"control", &logging},
798+
{"util", &validateaddress},
799+
{"util", &createmultisig},
800+
{"util", &deriveaddresses},
801+
{"util", &getdescriptorinfo},
802+
{"util", &verifymessage},
803+
{"util", &signmessagewithprivkey},
804+
{"util", &getindexinfo},
805+
{"hidden", &setmocktime},
806+
{"hidden", &mockscheduler},
807+
{"hidden", &echo},
808+
{"hidden", &echojson},
809+
{"hidden", &echoipc},
815810
#if defined(USE_SYSCALL_SANDBOX)
816-
{ "hidden", &invokedisallowedsyscall, },
811+
{"hidden", &invokedisallowedsyscall},
817812
#endif // USE_SYSCALL_SANDBOX
818-
};
819-
// clang-format on
813+
};
820814
for (const auto& c : commands) {
821815
t.appendCommand(c.name, &c);
822816
}

src/rpc/net.cpp

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -959,30 +959,25 @@ static RPCHelpMan addpeeraddress()
959959
};
960960
}
961961

962-
void RegisterNetRPCCommands(CRPCTable &t)
963-
{
964-
// clang-format off
965-
static const CRPCCommand commands[] =
966-
{ // category actor
967-
// --------------------- -----------------------
968-
{ "network", &getconnectioncount, },
969-
{ "network", &ping, },
970-
{ "network", &getpeerinfo, },
971-
{ "network", &addnode, },
972-
{ "network", &disconnectnode, },
973-
{ "network", &getaddednodeinfo, },
974-
{ "network", &getnettotals, },
975-
{ "network", &getnetworkinfo, },
976-
{ "network", &setban, },
977-
{ "network", &listbanned, },
978-
{ "network", &clearbanned, },
979-
{ "network", &setnetworkactive, },
980-
{ "network", &getnodeaddresses, },
981-
982-
{ "hidden", &addconnection, },
983-
{ "hidden", &addpeeraddress, },
984-
};
985-
// clang-format on
962+
void RegisterNetRPCCommands(CRPCTable& t)
963+
{
964+
static const CRPCCommand commands[]{
965+
{"network", &getconnectioncount},
966+
{"network", &ping},
967+
{"network", &getpeerinfo},
968+
{"network", &addnode},
969+
{"network", &disconnectnode},
970+
{"network", &getaddednodeinfo},
971+
{"network", &getnettotals},
972+
{"network", &getnetworkinfo},
973+
{"network", &setban},
974+
{"network", &listbanned},
975+
{"network", &clearbanned},
976+
{"network", &setnetworkactive},
977+
{"network", &getnodeaddresses},
978+
{"hidden", &addconnection},
979+
{"hidden", &addpeeraddress},
980+
};
986981
for (const auto& c : commands) {
987982
t.appendCommand(c.name, &c);
988983
}

src/rpc/rawtransaction.cpp

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,28 +1680,24 @@ static RPCHelpMan analyzepsbt()
16801680
};
16811681
}
16821682

1683-
void RegisterRawTransactionRPCCommands(CRPCTable &t)
1683+
void RegisterRawTransactionRPCCommands(CRPCTable& t)
16841684
{
1685-
// clang-format off
1686-
static const CRPCCommand commands[] =
1687-
{ // category actor (function)
1688-
// --------------------- -----------------------
1689-
{ "rawtransactions", &getrawtransaction, },
1690-
{ "rawtransactions", &createrawtransaction, },
1691-
{ "rawtransactions", &decoderawtransaction, },
1692-
{ "rawtransactions", &decodescript, },
1693-
{ "rawtransactions", &combinerawtransaction, },
1694-
{ "rawtransactions", &signrawtransactionwithkey, },
1695-
{ "rawtransactions", &decodepsbt, },
1696-
{ "rawtransactions", &combinepsbt, },
1697-
{ "rawtransactions", &finalizepsbt, },
1698-
{ "rawtransactions", &createpsbt, },
1699-
{ "rawtransactions", &converttopsbt, },
1700-
{ "rawtransactions", &utxoupdatepsbt, },
1701-
{ "rawtransactions", &joinpsbts, },
1702-
{ "rawtransactions", &analyzepsbt, },
1703-
};
1704-
// clang-format on
1685+
static const CRPCCommand commands[]{
1686+
{"rawtransactions", &getrawtransaction},
1687+
{"rawtransactions", &createrawtransaction},
1688+
{"rawtransactions", &decoderawtransaction},
1689+
{"rawtransactions", &decodescript},
1690+
{"rawtransactions", &combinerawtransaction},
1691+
{"rawtransactions", &signrawtransactionwithkey},
1692+
{"rawtransactions", &decodepsbt},
1693+
{"rawtransactions", &combinepsbt},
1694+
{"rawtransactions", &finalizepsbt},
1695+
{"rawtransactions", &createpsbt},
1696+
{"rawtransactions", &converttopsbt},
1697+
{"rawtransactions", &utxoupdatepsbt},
1698+
{"rawtransactions", &joinpsbts},
1699+
{"rawtransactions", &analyzepsbt},
1700+
};
17051701
for (const auto& c : commands) {
17061702
t.appendCommand(c.name, &c);
17071703
}

src/rpc/server.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -247,17 +247,13 @@ static RPCHelpMan getrpcinfo()
247247
};
248248
}
249249

250-
// clang-format off
251-
static const CRPCCommand vRPCCommands[] =
252-
{ // category actor (function)
253-
// --------------------- -----------------------
250+
static const CRPCCommand vRPCCommands[]{
254251
/* Overall control/query calls */
255-
{ "control", &getrpcinfo, },
256-
{ "control", &help, },
257-
{ "control", &stop, },
258-
{ "control", &uptime, },
252+
{"control", &getrpcinfo},
253+
{"control", &help},
254+
{"control", &stop},
255+
{"control", &uptime},
259256
};
260-
// clang-format on
261257

262258
CRPCTable::CRPCTable()
263259
{

src/rpc/txoutproof.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,6 @@ static RPCHelpMan verifytxoutproof()
172172
void RegisterTxoutProofRPCCommands(CRPCTable& t)
173173
{
174174
static const CRPCCommand commands[]{
175-
// category actor (function)
176-
// -------- ----------------
177175
{"blockchain", &gettxoutproof},
178176
{"blockchain", &verifytxoutproof},
179177
};

0 commit comments

Comments
 (0)