mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
doc: Convert remaining comments to clang-tidy format
This commit is contained in:
parent
ce33194ea0
commit
ffffb7a25a
8 changed files with 19 additions and 19 deletions
|
@ -82,9 +82,9 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset,
|
|||
|
||||
for (CChainState* chainstate : chainman.GetAll()) {
|
||||
chainstate->InitCoinsDB(
|
||||
/* cache_size_bytes */ nCoinDBCache,
|
||||
/* in_memory */ coins_db_in_memory,
|
||||
/* should_wipe */ fReset || fReindexChainState);
|
||||
/*cache_size_bytes=*/nCoinDBCache,
|
||||
/*in_memory=*/coins_db_in_memory,
|
||||
/*should_wipe=*/fReset || fReindexChainState);
|
||||
|
||||
if (coins_error_cb) {
|
||||
chainstate->CoinsErrorCatcher().AddReadErrCallback(coins_error_cb);
|
||||
|
|
|
@ -91,7 +91,7 @@ void SignVerifyMessageDialog::on_addressBookButton_SM_clicked()
|
|||
{
|
||||
if (model && model->getAddressTableModel())
|
||||
{
|
||||
model->refresh(/* pk_hash_only */ true);
|
||||
model->refresh(/*pk_hash_only=*/true);
|
||||
AddressBookPage dlg(platformStyle, AddressBookPage::ForSelection, AddressBookPage::ReceivingTab, this);
|
||||
dlg.setModel(model->getAddressTableModel());
|
||||
if (dlg.exec())
|
||||
|
|
|
@ -661,7 +661,7 @@ static bool rest_tx(const std::any& context, HTTPRequest* req, const std::string
|
|||
const NodeContext* const node = GetNodeContext(context, req);
|
||||
if (!node) return false;
|
||||
uint256 hashBlock = uint256();
|
||||
const CTransactionRef tx = GetTransaction(/* block_index */ nullptr, node->mempool.get(), hash, Params().GetConsensus(), hashBlock);
|
||||
const CTransactionRef tx = GetTransaction(/*block_index=*/nullptr, node->mempool.get(), hash, Params().GetConsensus(), hashBlock);
|
||||
if (!tx) {
|
||||
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found");
|
||||
}
|
||||
|
|
|
@ -421,7 +421,7 @@ struct Sections {
|
|||
if (arg.m_type_str.size() != 0 && push_name) {
|
||||
left += "\"" + arg.GetName() + "\": " + arg.m_type_str.at(0);
|
||||
} else {
|
||||
left += push_name ? arg.ToStringObj(/* oneline */ false) : arg.ToString(/* oneline */ false);
|
||||
left += push_name ? arg.ToStringObj(/*oneline=*/false) : arg.ToString(/*oneline=*/false);
|
||||
}
|
||||
left += ",";
|
||||
PushSection({left, arg.ToDescriptionString()});
|
||||
|
@ -627,7 +627,7 @@ std::string RPCHelpMan::ToString() const
|
|||
if (was_optional) ret += ") ";
|
||||
was_optional = false;
|
||||
}
|
||||
ret += arg.ToString(/* oneline */ true);
|
||||
ret += arg.ToString(/*oneline=*/true);
|
||||
}
|
||||
if (was_optional) ret += " )";
|
||||
|
||||
|
|
|
@ -1503,27 +1503,27 @@ inline NodeRef<Key> DecodeScript(I& in, I last, const Ctx& ctx)
|
|||
}
|
||||
case DecodeContext::AND_V: {
|
||||
if (constructed.size() < 2) return {};
|
||||
BuildBack(Fragment::AND_V, constructed, /* reverse */ true);
|
||||
BuildBack(Fragment::AND_V, constructed, /*reverse=*/true);
|
||||
break;
|
||||
}
|
||||
case DecodeContext::AND_B: {
|
||||
if (constructed.size() < 2) return {};
|
||||
BuildBack(Fragment::AND_B, constructed, /* reverse */ true);
|
||||
BuildBack(Fragment::AND_B, constructed, /*reverse=*/true);
|
||||
break;
|
||||
}
|
||||
case DecodeContext::OR_B: {
|
||||
if (constructed.size() < 2) return {};
|
||||
BuildBack(Fragment::OR_B, constructed, /* reverse */ true);
|
||||
BuildBack(Fragment::OR_B, constructed, /*reverse=*/true);
|
||||
break;
|
||||
}
|
||||
case DecodeContext::OR_C: {
|
||||
if (constructed.size() < 2) return {};
|
||||
BuildBack(Fragment::OR_C, constructed, /* reverse */ true);
|
||||
BuildBack(Fragment::OR_C, constructed, /*reverse=*/true);
|
||||
break;
|
||||
}
|
||||
case DecodeContext::OR_D: {
|
||||
if (constructed.size() < 2) return {};
|
||||
BuildBack(Fragment::OR_D, constructed, /* reverse */ true);
|
||||
BuildBack(Fragment::OR_D, constructed, /*reverse=*/true);
|
||||
break;
|
||||
}
|
||||
case DecodeContext::ANDOR: {
|
||||
|
@ -1607,7 +1607,7 @@ inline NodeRef<Key> DecodeScript(I& in, I last, const Ctx& ctx)
|
|||
if (in >= last) return {};
|
||||
if (in[0].first == OP_IF) {
|
||||
++in;
|
||||
BuildBack(Fragment::OR_I, constructed, /* reverse */ true);
|
||||
BuildBack(Fragment::OR_I, constructed, /*reverse=*/true);
|
||||
} else if (in[0].first == OP_NOTIF) {
|
||||
++in;
|
||||
to_parse.emplace_back(DecodeContext::ANDOR, -1, -1);
|
||||
|
|
|
@ -478,8 +478,8 @@ BOOST_AUTO_TEST_CASE(peer_protection_test)
|
|||
c.m_network = NET_IPV6;
|
||||
}
|
||||
},
|
||||
/* protected_peer_ids */ {0, 4},
|
||||
/* unprotected_peer_ids */ {1, 2, 3},
|
||||
/*protected_peer_ids=*/{0, 4},
|
||||
/*unprotected_peer_ids=*/{1, 2, 3},
|
||||
random_context));
|
||||
|
||||
// Combined test: expect having 1 CJDNS, 1 I2P, 1 localhost and 1 onion peer
|
||||
|
|
|
@ -4837,7 +4837,7 @@ bool ChainstateManager::ActivateSnapshot(
|
|||
|
||||
auto snapshot_chainstate = WITH_LOCK(::cs_main,
|
||||
return std::make_unique<CChainState>(
|
||||
/* mempool */ nullptr, m_blockman, *this, base_blockhash));
|
||||
/*mempool=*/nullptr, m_blockman, *this, base_blockhash));
|
||||
|
||||
{
|
||||
LOCK(::cs_main);
|
||||
|
|
|
@ -1260,7 +1260,7 @@ RPCHelpMan importmulti()
|
|||
{
|
||||
{"desc", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Descriptor to import. If using descriptor, do not also provide address/scriptPubKey, scripts, or pubkeys"},
|
||||
{"scriptPubKey", RPCArg::Type::STR, RPCArg::Optional::NO, "Type of scriptPubKey (string for script, json for address). Should not be provided if using a descriptor",
|
||||
/* oneline_description */ "", {"\"<script>\" | { \"address\":\"<address>\" }", "string / json"}
|
||||
/*oneline_description=*/"", {"\"<script>\" | { \"address\":\"<address>\" }", "string / json"}
|
||||
},
|
||||
{"timestamp", RPCArg::Type::NUM, RPCArg::Optional::NO, "Creation time of the key expressed in " + UNIX_EPOCH_TIME + ",\n"
|
||||
" or the string \"now\" to substitute the current synced blockchain time. The timestamp of the oldest\n"
|
||||
|
@ -1268,7 +1268,7 @@ RPCHelpMan importmulti()
|
|||
" \"now\" can be specified to bypass scanning, for keys which are known to never have been used, and\n"
|
||||
" 0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest key\n"
|
||||
" creation time of all keys being imported by the importmulti call will be scanned.",
|
||||
/* oneline_description */ "", {"timestamp | \"now\"", "integer / string"}
|
||||
/*oneline_description=*/"", {"timestamp | \"now\"", "integer / string"}
|
||||
},
|
||||
{"redeemscript", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Allowed only if the scriptPubKey is a P2SH or P2SH-P2WSH address/scriptPubKey"},
|
||||
{"witnessscript", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Allowed only if the scriptPubKey is a P2SH-P2WSH or P2WSH address/scriptPubKey"},
|
||||
|
@ -1596,7 +1596,7 @@ RPCHelpMan importdescriptors()
|
|||
" \"now\" can be specified to bypass scanning, for outputs which are known to never have been used, and\n"
|
||||
" 0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest timestamp\n"
|
||||
" of all descriptors being imported will be scanned.",
|
||||
/* oneline_description */ "", {"timestamp | \"now\"", "integer / string"}
|
||||
/*oneline_description=*/"", {"timestamp | \"now\"", "integer / string"}
|
||||
},
|
||||
{"internal", RPCArg::Type::BOOL, RPCArg::Default{false}, "Whether matching outputs should be treated as not incoming payments (e.g. change)"},
|
||||
{"label", RPCArg::Type::STR, RPCArg::Default{""}, "Label to assign to the address, only allowed with internal=false. Disabled for ranged descriptors"},
|
||||
|
|
Loading…
Add table
Reference in a new issue