Skip to content

Commit c5b3773

Browse files
fanquakeknst
authored andcommitted
Merge bitcoin#24786: doc: Convert remaining comments to clang-tidy format
ffffb7a doc: Convert remaining comments to clang-tidy format (MarcoFalke) Pull request description: This is a follow-up to commit 0da559e, hopefully the last one. ACKs for top commit: Empact: Code review ACK ffffb7a vincenzopalazzo: ACK bitcoin@ffffb7a Tree-SHA512: 541f5e69aeee53815e77e63b9012d3ed24856eec5f7e28cc764b3ce29f897563e56ade07db9891324f2809dcf064ce10333b1a1e4a7490af9bd97dcf6ff4e4f7
1 parent 5867f71 commit c5b3773

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

src/node/chainstate.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset,
148148

149149
for (CChainState* chainstate : chainman.GetAll()) {
150150
chainstate->InitCoinsDB(
151-
/* cache_size_bytes */ nCoinDBCache,
152-
/* in_memory */ coins_db_in_memory,
153-
/* should_wipe */ fReset || fReindexChainState);
151+
/*cache_size_bytes=*/nCoinDBCache,
152+
/*in_memory=*/coins_db_in_memory,
153+
/*should_wipe=*/fReset || fReindexChainState);
154154

155155
if (coins_error_cb) {
156156
chainstate->CoinsErrorCatcher().AddReadErrCallback(coins_error_cb);

src/rest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ static bool rest_tx(const CoreContext& context, HTTPRequest* req, const std::str
691691
const NodeContext* const node = GetNodeContext(context, req);
692692
if (!node) return false;
693693
uint256 hashBlock = uint256();
694-
const CTransactionRef tx = GetTransaction(/* block_index */ nullptr, node->mempool.get(), hash, Params().GetConsensus(), hashBlock);
694+
const CTransactionRef tx = GetTransaction(/*block_index=*/nullptr, node->mempool.get(), hash, Params().GetConsensus(), hashBlock);
695695
if (!tx) {
696696
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found");
697697
}

src/rpc/util.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ struct Sections {
375375
if (arg.m_type_str.size() != 0 && push_name) {
376376
left += "\"" + arg.GetName() + "\": " + arg.m_type_str.at(0);
377377
} else {
378-
left += push_name ? arg.ToStringObj(/* oneline */ false) : arg.ToString(/* oneline */ false);
378+
left += push_name ? arg.ToStringObj(/*oneline=*/false) : arg.ToString(/*oneline=*/false);
379379
}
380380
left += ",";
381381
PushSection({left, arg.ToDescriptionString()});
@@ -578,7 +578,7 @@ std::string RPCHelpMan::ToString() const
578578
if (was_optional) ret += ") ";
579579
was_optional = false;
580580
}
581-
ret += arg.ToString(/* oneline */ true);
581+
ret += arg.ToString(/*oneline=*/true);
582582
}
583583
if (was_optional) ret += " )";
584584

src/script/miniscript.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,27 +1500,27 @@ inline NodeRef<Key> DecodeScript(I& in, I last, const Ctx& ctx)
15001500
}
15011501
case DecodeContext::AND_V: {
15021502
if (constructed.size() < 2) return {};
1503-
BuildBack(Fragment::AND_V, constructed, /* reverse */ true);
1503+
BuildBack(Fragment::AND_V, constructed, /*reverse=*/true);
15041504
break;
15051505
}
15061506
case DecodeContext::AND_B: {
15071507
if (constructed.size() < 2) return {};
1508-
BuildBack(Fragment::AND_B, constructed, /* reverse */ true);
1508+
BuildBack(Fragment::AND_B, constructed, /*reverse=*/true);
15091509
break;
15101510
}
15111511
case DecodeContext::OR_B: {
15121512
if (constructed.size() < 2) return {};
1513-
BuildBack(Fragment::OR_B, constructed, /* reverse */ true);
1513+
BuildBack(Fragment::OR_B, constructed, /*reverse=*/true);
15141514
break;
15151515
}
15161516
case DecodeContext::OR_C: {
15171517
if (constructed.size() < 2) return {};
1518-
BuildBack(Fragment::OR_C, constructed, /* reverse */ true);
1518+
BuildBack(Fragment::OR_C, constructed, /*reverse=*/true);
15191519
break;
15201520
}
15211521
case DecodeContext::OR_D: {
15221522
if (constructed.size() < 2) return {};
1523-
BuildBack(Fragment::OR_D, constructed, /* reverse */ true);
1523+
BuildBack(Fragment::OR_D, constructed, /*reverse=*/true);
15241524
break;
15251525
}
15261526
case DecodeContext::ANDOR: {
@@ -1604,7 +1604,7 @@ inline NodeRef<Key> DecodeScript(I& in, I last, const Ctx& ctx)
16041604
if (in >= last) return {};
16051605
if (in[0].first == OP_IF) {
16061606
++in;
1607-
BuildBack(Fragment::OR_I, constructed, /* reverse */ true);
1607+
BuildBack(Fragment::OR_I, constructed, /*reverse=*/true);
16081608
} else if (in[0].first == OP_NOTIF) {
16091609
++in;
16101610
to_parse.emplace_back(DecodeContext::ANDOR, -1, -1);

src/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5758,7 +5758,7 @@ bool ChainstateManager::ActivateSnapshot(
57585758
}
57595759

57605760
auto snapshot_chainstate = WITH_LOCK(::cs_main, return std::make_unique<CChainState>(
5761-
/* mempool */ nullptr, m_blockman, *this,
5761+
/*mempool=*/ nullptr, m_blockman, *this,
57625762
this->ActiveChainstate().m_evoDb,
57635763
this->ActiveChainstate().m_chain_helper,
57645764
base_blockhash

src/wallet/rpc/backup.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,15 +1486,15 @@ RPCHelpMan importmulti()
14861486
{"desc", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Descriptor to import. If using descriptor, do not also provide address/scriptPubKey, scripts, or pubkeys"
14871487
},
14881488
{"scriptPubKey", RPCArg::Type::STR, RPCArg::Optional::NO, "Type of scriptPubKey (string for script, json for address). Should not be provided if using a descriptor",
1489-
/* oneline_description */ "", {"\"<script>\" | { \"address\":\"<address>\" }", "string / json"}
1489+
/*oneline_description=*/"", {"\"<script>\" | { \"address\":\"<address>\" }", "string / json"}
14901490
},
14911491
{"timestamp", RPCArg::Type::NUM, RPCArg::Optional::NO, "Creation time of the key expressed in " + UNIX_EPOCH_TIME + ",\n"
14921492
" or the string \"now\" to substitute the current synced blockchain time. The timestamp of the oldest\n"
14931493
" key will determine how far back blockchain rescans need to begin for missing wallet transactions.\n"
14941494
" \"now\" can be specified to bypass scanning, for keys which are known to never have been used, and\n"
14951495
" 0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest key\n"
14961496
" creation time of all keys being imported by the importmulti call will be scanned.",
1497-
/* oneline_description */ "", {"timestamp | \"now\"", "integer / string"}
1497+
/*oneline_description=*/"", {"timestamp | \"now\"", "integer / string"}
14981498
},
14991499
{"redeemscript", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Allowed only if the scriptPubKey is a P2SH address or a P2SH scriptPubKey"},
15001500
{"pubkeys", RPCArg::Type::ARR, RPCArg::Default{UniValue::VARR}, "Array of strings giving pubkeys to import. They must occur in P2PKH or P2WPKH scripts. They are not required when the private key is also provided (see the \"keys\" argument).",
@@ -1820,7 +1820,7 @@ RPCHelpMan importdescriptors() {
18201820
" \"now\" can be specified to bypass scanning, for outputs which are known to never have been used, and\n"
18211821
" 0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest timestamp\n"
18221822
" of all descriptors being imported will be scanned.",
1823-
/* oneline_description */ "", {"timestamp | \"now\"", "integer / string"}
1823+
/*oneline_description=*/"", {"timestamp | \"now\"", "integer / string"}
18241824
},
18251825
{"internal", RPCArg::Type::BOOL, RPCArg::Default{false}, "Whether matching outputs should be treated as not incoming payments (e.g. change)"},
18261826
{"label", RPCArg::Type::STR, RPCArg::Default{""}, "Label to assign to the address, only allowed with internal=false. Disabled for ranged descriptors"},

0 commit comments

Comments
 (0)