mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
Fixup clang-tidy named argument comments
Fix comments so they are checked/consistent. Fix incorrect arguments.
This commit is contained in:
parent
38cbf43dee
commit
203886c443
21 changed files with 51 additions and 51 deletions
|
@ -40,7 +40,7 @@ static void EvictionProtection0Networks250Candidates(benchmark::Bench& bench)
|
|||
{
|
||||
EvictionProtectionCommon(
|
||||
bench,
|
||||
250 /* num_candidates */,
|
||||
/*num_candidates=*/250,
|
||||
[](NodeEvictionCandidate& c) {
|
||||
c.m_connected = std::chrono::seconds{c.id};
|
||||
c.m_network = NET_IPV4;
|
||||
|
@ -51,7 +51,7 @@ static void EvictionProtection1Networks250Candidates(benchmark::Bench& bench)
|
|||
{
|
||||
EvictionProtectionCommon(
|
||||
bench,
|
||||
250 /* num_candidates */,
|
||||
/*num_candidates=*/250,
|
||||
[](NodeEvictionCandidate& c) {
|
||||
c.m_connected = std::chrono::seconds{c.id};
|
||||
c.m_is_local = false;
|
||||
|
@ -67,7 +67,7 @@ static void EvictionProtection2Networks250Candidates(benchmark::Bench& bench)
|
|||
{
|
||||
EvictionProtectionCommon(
|
||||
bench,
|
||||
250 /* num_candidates */,
|
||||
/*num_candidates=*/250,
|
||||
[](NodeEvictionCandidate& c) {
|
||||
c.m_connected = std::chrono::seconds{c.id};
|
||||
c.m_is_local = false;
|
||||
|
@ -85,7 +85,7 @@ static void EvictionProtection3Networks050Candidates(benchmark::Bench& bench)
|
|||
{
|
||||
EvictionProtectionCommon(
|
||||
bench,
|
||||
50 /* num_candidates */,
|
||||
/*num_candidates=*/50,
|
||||
[](NodeEvictionCandidate& c) {
|
||||
c.m_connected = std::chrono::seconds{c.id};
|
||||
c.m_is_local = (c.id == 28 || c.id == 47); // 2 localhost
|
||||
|
@ -103,7 +103,7 @@ static void EvictionProtection3Networks100Candidates(benchmark::Bench& bench)
|
|||
{
|
||||
EvictionProtectionCommon(
|
||||
bench,
|
||||
100 /* num_candidates */,
|
||||
/*num_candidates=*/100,
|
||||
[](NodeEvictionCandidate& c) {
|
||||
c.m_connected = std::chrono::seconds{c.id};
|
||||
c.m_is_local = (c.id >= 55 && c.id < 60); // 5 localhost
|
||||
|
@ -121,7 +121,7 @@ static void EvictionProtection3Networks250Candidates(benchmark::Bench& bench)
|
|||
{
|
||||
EvictionProtectionCommon(
|
||||
bench,
|
||||
250 /* num_candidates */,
|
||||
/*num_candidates=*/250,
|
||||
[](NodeEvictionCandidate& c) {
|
||||
c.m_connected = std::chrono::seconds{c.id};
|
||||
c.m_is_local = (c.id >= 140 && c.id < 160); // 20 localhost
|
||||
|
|
|
@ -1571,7 +1571,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||
}
|
||||
|
||||
if (args.GetBoolArg("-coinstatsindex", DEFAULT_COINSTATSINDEX)) {
|
||||
g_coin_stats_index = std::make_unique<CoinStatsIndex>(interfaces::MakeChain(node), /* cache size */ 0, false, fReindex);
|
||||
g_coin_stats_index = std::make_unique<CoinStatsIndex>(interfaces::MakeChain(node), /*cache_size=*/0, false, fReindex);
|
||||
if (!g_coin_stats_index->Start()) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -875,7 +875,7 @@ struct PSBTOutput
|
|||
throw std::ios_base::failure("Output Taproot tree has a leaf with an invalid leaf version");
|
||||
}
|
||||
m_tap_tree.push_back(std::make_tuple(depth, leaf_ver, script));
|
||||
builder.Add((int)depth, script, (int)leaf_ver, true /* track */);
|
||||
builder.Add((int)depth, script, (int)leaf_ver, /*track=*/true);
|
||||
}
|
||||
if (!builder.IsComplete()) {
|
||||
throw std::ios_base::failure("Output Taproot tree is malformed");
|
||||
|
|
|
@ -477,7 +477,7 @@ void CoinControlDialog::updateLabels(CCoinControl& m_coin_control, WalletModel *
|
|||
nBytes -= 34;
|
||||
|
||||
// Fee
|
||||
nPayFee = model->wallet().getMinimumFee(nBytes, m_coin_control, nullptr /* returned_target */, nullptr /* reason */);
|
||||
nPayFee = model->wallet().getMinimumFee(nBytes, m_coin_control, /*returned_target=*/nullptr, /*reason=*/nullptr);
|
||||
|
||||
if (nPayAmount > 0)
|
||||
{
|
||||
|
|
|
@ -56,7 +56,7 @@ void PSBTOperationsDialog::openWithPSBT(PartiallySignedTransaction psbtx)
|
|||
bool complete = FinalizePSBT(psbtx); // Make sure all existing signatures are fully combined before checking for completeness.
|
||||
if (m_wallet_model) {
|
||||
size_t n_could_sign;
|
||||
TransactionError err = m_wallet_model->wallet().fillPSBT(SIGHASH_ALL, false /* sign */, true /* bip32derivs */, &n_could_sign, m_transaction_data, complete);
|
||||
TransactionError err = m_wallet_model->wallet().fillPSBT(SIGHASH_ALL, /*sign=*/false, /*bip32derivs=*/true, &n_could_sign, m_transaction_data, complete);
|
||||
if (err != TransactionError::OK) {
|
||||
showStatus(tr("Failed to load transaction: %1")
|
||||
.arg(QString::fromStdString(TransactionErrorString(err).translated)),
|
||||
|
@ -80,7 +80,7 @@ void PSBTOperationsDialog::signTransaction()
|
|||
|
||||
WalletModel::UnlockContext ctx(m_wallet_model->requestUnlock());
|
||||
|
||||
TransactionError err = m_wallet_model->wallet().fillPSBT(SIGHASH_ALL, true /* sign */, true /* bip32derivs */, &n_signed, m_transaction_data, complete);
|
||||
TransactionError err = m_wallet_model->wallet().fillPSBT(SIGHASH_ALL, /*sign=*/true, /*bip32derivs=*/true, &n_signed, m_transaction_data, complete);
|
||||
|
||||
if (err != TransactionError::OK) {
|
||||
showStatus(tr("Failed to sign transaction: %1")
|
||||
|
@ -245,7 +245,7 @@ size_t PSBTOperationsDialog::couldSignInputs(const PartiallySignedTransaction &p
|
|||
|
||||
size_t n_signed;
|
||||
bool complete;
|
||||
TransactionError err = m_wallet_model->wallet().fillPSBT(SIGHASH_ALL, false /* sign */, false /* bip32derivs */, &n_signed, m_transaction_data, complete);
|
||||
TransactionError err = m_wallet_model->wallet().fillPSBT(SIGHASH_ALL, /*sign=*/false, /*bip32derivs=*/false, &n_signed, m_transaction_data, complete);
|
||||
|
||||
if (err != TransactionError::OK) {
|
||||
return 0;
|
||||
|
|
|
@ -72,7 +72,7 @@ void AppTests::appTests()
|
|||
|
||||
qRegisterMetaType<interfaces::BlockAndHeaderTipInfo>("interfaces::BlockAndHeaderTipInfo");
|
||||
m_app.parameterSetup();
|
||||
QVERIFY(m_app.createOptionsModel(true /* reset settings */));
|
||||
QVERIFY(m_app.createOptionsModel(/*resetSettings=*/true));
|
||||
QScopedPointer<const NetworkStyle> style(NetworkStyle::instantiate(Params().NetworkIDString()));
|
||||
m_app.setupPlatformStyle();
|
||||
m_app.createWindow(style.data());
|
||||
|
|
|
@ -210,17 +210,17 @@ void TestGUI(interfaces::Node& node)
|
|||
// Send two transactions, and verify they are added to transaction list.
|
||||
TransactionTableModel* transactionTableModel = walletModel.getTransactionTableModel();
|
||||
QCOMPARE(transactionTableModel->rowCount({}), 105);
|
||||
uint256 txid1 = SendCoins(*wallet.get(), sendCoinsDialog, PKHash(), 5 * COIN, false /* rbf */);
|
||||
uint256 txid2 = SendCoins(*wallet.get(), sendCoinsDialog, PKHash(), 10 * COIN, true /* rbf */);
|
||||
uint256 txid1 = SendCoins(*wallet.get(), sendCoinsDialog, PKHash(), 5 * COIN, /*rbf=*/false);
|
||||
uint256 txid2 = SendCoins(*wallet.get(), sendCoinsDialog, PKHash(), 10 * COIN, /*rbf=*/true);
|
||||
QCOMPARE(transactionTableModel->rowCount({}), 107);
|
||||
QVERIFY(FindTx(*transactionTableModel, txid1).isValid());
|
||||
QVERIFY(FindTx(*transactionTableModel, txid2).isValid());
|
||||
|
||||
// Call bumpfee. Test disabled, canceled, enabled, then failing cases.
|
||||
BumpFee(transactionView, txid1, true /* expect disabled */, "not BIP 125 replaceable" /* expected error */, false /* cancel */);
|
||||
BumpFee(transactionView, txid2, false /* expect disabled */, {} /* expected error */, true /* cancel */);
|
||||
BumpFee(transactionView, txid2, false /* expect disabled */, {} /* expected error */, false /* cancel */);
|
||||
BumpFee(transactionView, txid2, true /* expect disabled */, "already bumped" /* expected error */, false /* cancel */);
|
||||
BumpFee(transactionView, txid1, /*expectDisabled=*/true, /*expectError=*/"not BIP 125 replaceable", /*cancel=*/false);
|
||||
BumpFee(transactionView, txid2, /*expectDisabled=*/false, /*expectError=*/{}, /*cancel=*/true);
|
||||
BumpFee(transactionView, txid2, /*expectDisabled=*/false, /*expectError=*/{}, /*cancel=*/false);
|
||||
BumpFee(transactionView, txid2, /*expectDisabled=*/true, /*expectError=*/"already bumped", /*cancel=*/false);
|
||||
|
||||
// Check current balance on OverviewPage
|
||||
OverviewPage overviewPage(platformStyle.get());
|
||||
|
|
|
@ -217,7 +217,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
|
|||
int nChangePosRet = -1;
|
||||
|
||||
auto& newTx = transaction.getWtx();
|
||||
const auto& res = m_wallet->createTransaction(vecSend, coinControl, !wallet().privateKeysDisabled() /* sign */, nChangePosRet, nFeeRequired);
|
||||
const auto& res = m_wallet->createTransaction(vecSend, coinControl, /*sign=*/!wallet().privateKeysDisabled(), nChangePosRet, nFeeRequired);
|
||||
newTx = res ? *res : nullptr;
|
||||
transaction.setTransactionFee(nFeeRequired);
|
||||
if (fSubtractFeeFromAmount && newTx)
|
||||
|
@ -258,7 +258,7 @@ void WalletModel::sendCoins(WalletModelTransaction& transaction)
|
|||
}
|
||||
|
||||
auto& newTx = transaction.getWtx();
|
||||
wallet().commitTransaction(newTx, {} /* mapValue */, std::move(vOrderForm));
|
||||
wallet().commitTransaction(newTx, /*value_map=*/{}, std::move(vOrderForm));
|
||||
|
||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
|
||||
ssTx << *newTx;
|
||||
|
@ -542,7 +542,7 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
|
|||
if (retval == QMessageBox::Save) {
|
||||
PartiallySignedTransaction psbtx(mtx);
|
||||
bool complete = false;
|
||||
const TransactionError err = wallet().fillPSBT(SIGHASH_ALL, false /* sign */, true /* bip32derivs */, nullptr, psbtx, complete);
|
||||
const TransactionError err = wallet().fillPSBT(SIGHASH_ALL, /*sign=*/false, /*bip32derivs=*/true, nullptr, psbtx, complete);
|
||||
if (err != TransactionError::OK || complete) {
|
||||
QMessageBox::critical(nullptr, tr("Fee bump error"), tr("Can't draft transaction."));
|
||||
return false;
|
||||
|
|
|
@ -103,7 +103,7 @@ std::string CRPCTable::help(const std::string& strCommand, const JSONRPCRequest&
|
|||
{
|
||||
UniValue unused_result;
|
||||
if (setDone.insert(pcmd->unique_id).second)
|
||||
pcmd->actor(jreq, unused_result, true /* last_handler */);
|
||||
pcmd->actor(jreq, unused_result, /*last_handler=*/true);
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
|
|
|
@ -107,12 +107,12 @@ BOOST_AUTO_TEST_CASE(potential_deadlock_detected)
|
|||
#ifdef DEBUG_LOCKORDER
|
||||
BOOST_AUTO_TEST_CASE(double_lock_mutex)
|
||||
{
|
||||
TestDoubleLock<Mutex>(true /* should throw */);
|
||||
TestDoubleLock<Mutex>(/*should_throw=*/true);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(double_lock_recursive_mutex)
|
||||
{
|
||||
TestDoubleLock<RecursiveMutex>(false /* should not throw */);
|
||||
TestDoubleLock<RecursiveMutex>(/*should_throw=*/false);
|
||||
}
|
||||
#endif /* DEBUG_LOCKORDER */
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ bool CreateFromDump(const ArgsManager& args, const std::string& name, const fs::
|
|||
|
||||
// dummy chain interface
|
||||
bool ret = true;
|
||||
std::shared_ptr<CWallet> wallet(new CWallet(nullptr /* chain */, name, gArgs, std::move(database)), WalletToolReleaseWallet);
|
||||
std::shared_ptr<CWallet> wallet(new CWallet(/*chain=*/nullptr, name, gArgs, std::move(database)), WalletToolReleaseWallet);
|
||||
{
|
||||
LOCK(wallet->cs_wallet);
|
||||
DBErrors load_wallet_ret = wallet->LoadWallet();
|
||||
|
|
|
@ -84,7 +84,7 @@ CFeeRate GetMinimumFeeRate(const CWallet& wallet, const CCoinControl& coin_contr
|
|||
CFeeRate GetDiscardRate(const CWallet& wallet)
|
||||
{
|
||||
unsigned int highest_target = wallet.chain().estimateMaxBlocks();
|
||||
CFeeRate discard_rate = wallet.chain().estimateSmartFee(highest_target, false /* conservative */);
|
||||
CFeeRate discard_rate = wallet.chain().estimateSmartFee(highest_target, /*conservative=*/false);
|
||||
// Don't let discard_rate be greater than longest possible fee estimate if we get a valid fee estimate
|
||||
discard_rate = (discard_rate == CFeeRate(0)) ? wallet.m_discard_rate : std::min(discard_rate, wallet.m_discard_rate);
|
||||
// Discard rate must be at least dust relay feerate
|
||||
|
|
|
@ -481,7 +481,7 @@ public:
|
|||
CAmount getDefaultMaxTxFee() override { return m_wallet->m_default_max_tx_fee; }
|
||||
void remove() override
|
||||
{
|
||||
RemoveWallet(m_context, m_wallet, false /* load_on_start */);
|
||||
RemoveWallet(m_context, m_wallet, /*load_on_start=*/false);
|
||||
}
|
||||
bool isLegacy() override { return m_wallet->IsLegacy(); }
|
||||
std::unique_ptr<Handler> handleUnload(UnloadFn fn) override
|
||||
|
|
|
@ -184,7 +184,7 @@ RPCHelpMan importprivkey()
|
|||
|
||||
// Add the wpkh script for this key if possible
|
||||
if (pubkey.IsCompressed()) {
|
||||
pwallet->ImportScripts({GetScriptForDestination(WitnessV0KeyHash(vchAddress))}, 0 /* timestamp */);
|
||||
pwallet->ImportScripts({GetScriptForDestination(WitnessV0KeyHash(vchAddress))}, /*timestamp=*/0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -273,19 +273,19 @@ RPCHelpMan importaddress()
|
|||
|
||||
pwallet->MarkDirty();
|
||||
|
||||
pwallet->ImportScriptPubKeys(strLabel, {GetScriptForDestination(dest)}, false /* have_solving_data */, true /* apply_label */, 1 /* timestamp */);
|
||||
pwallet->ImportScriptPubKeys(strLabel, {GetScriptForDestination(dest)}, /*have_solving_data=*/false, /*apply_label=*/true, /*timestamp=*/1);
|
||||
} else if (IsHex(request.params[0].get_str())) {
|
||||
std::vector<unsigned char> data(ParseHex(request.params[0].get_str()));
|
||||
CScript redeem_script(data.begin(), data.end());
|
||||
|
||||
std::set<CScript> scripts = {redeem_script};
|
||||
pwallet->ImportScripts(scripts, 0 /* timestamp */);
|
||||
pwallet->ImportScripts(scripts, /*timestamp=*/0);
|
||||
|
||||
if (fP2SH) {
|
||||
scripts.insert(GetScriptForDestination(ScriptHash(redeem_script)));
|
||||
}
|
||||
|
||||
pwallet->ImportScriptPubKeys(strLabel, scripts, false /* have_solving_data */, true /* apply_label */, 1 /* timestamp */);
|
||||
pwallet->ImportScriptPubKeys(strLabel, scripts, /*have_solving_data=*/false, /*apply_label=*/true, /*timestamp=*/1);
|
||||
} else {
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address or script");
|
||||
}
|
||||
|
@ -464,9 +464,9 @@ RPCHelpMan importpubkey()
|
|||
|
||||
pwallet->MarkDirty();
|
||||
|
||||
pwallet->ImportScriptPubKeys(strLabel, script_pub_keys, true /* have_solving_data */, true /* apply_label */, 1 /* timestamp */);
|
||||
pwallet->ImportScriptPubKeys(strLabel, script_pub_keys, /*have_solving_data=*/true, /*apply_label=*/true, /*timestamp=*/1);
|
||||
|
||||
pwallet->ImportPubKeys({pubKey.GetID()}, {{pubKey.GetID(), pubKey}} , {} /* key_origins */, false /* add_keypool */, false /* internal */, 1 /* timestamp */);
|
||||
pwallet->ImportPubKeys({pubKey.GetID()}, {{pubKey.GetID(), pubKey}} , /*key_origins=*/{}, /*add_keypool=*/false, /*internal=*/false, /*timestamp=*/1);
|
||||
}
|
||||
if (fRescan)
|
||||
{
|
||||
|
@ -625,7 +625,7 @@ RPCHelpMan importwallet()
|
|||
pwallet->chain().showProgress("", 100, false); // hide progress dialog in GUI
|
||||
}
|
||||
pwallet->chain().showProgress("", 100, false); // hide progress dialog in GUI
|
||||
RescanWallet(*pwallet, reserver, nTimeBegin, false /* update */);
|
||||
RescanWallet(*pwallet, reserver, nTimeBegin, /*update=*/false);
|
||||
pwallet->MarkDirty();
|
||||
|
||||
if (!fGood)
|
||||
|
@ -1399,7 +1399,7 @@ RPCHelpMan importmulti()
|
|||
}
|
||||
}
|
||||
if (fRescan && fRunScan && requests.size()) {
|
||||
int64_t scannedTime = pwallet->RescanFromTime(nLowestTimestamp, reserver, true /* update */);
|
||||
int64_t scannedTime = pwallet->RescanFromTime(nLowestTimestamp, reserver, /*update=*/true);
|
||||
pwallet->ResubmitWalletTransactions(/*relay=*/false, /*force=*/true);
|
||||
|
||||
if (pwallet->IsAbortingRescan()) {
|
||||
|
@ -1691,7 +1691,7 @@ RPCHelpMan importdescriptors()
|
|||
|
||||
// Rescan the blockchain using the lowest timestamp
|
||||
if (rescan) {
|
||||
int64_t scanned_time = pwallet->RescanFromTime(lowest_timestamp, reserver, true /* update */);
|
||||
int64_t scanned_time = pwallet->RescanFromTime(lowest_timestamp, reserver, /*update=*/true);
|
||||
pwallet->ResubmitWalletTransactions(/*relay=*/false, /*force=*/true);
|
||||
|
||||
if (pwallet->IsAbortingRescan()) {
|
||||
|
|
|
@ -161,7 +161,7 @@ UniValue SendMoney(CWallet& wallet, const CCoinControl &coin_control, std::vecto
|
|||
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, util::ErrorString(res).original);
|
||||
}
|
||||
const CTransactionRef& tx = res->tx;
|
||||
wallet.CommitTransaction(tx, std::move(map_value), {} /* orderForm */);
|
||||
wallet.CommitTransaction(tx, std::move(map_value), /*orderForm=*/{});
|
||||
if (verbose) {
|
||||
UniValue entry(UniValue::VOBJ);
|
||||
entry.pushKV("txid", tx->GetHash().GetHex());
|
||||
|
@ -1083,7 +1083,7 @@ static RPCHelpMan bumpfee_helper(std::string method_name)
|
|||
} else {
|
||||
PartiallySignedTransaction psbtx(mtx);
|
||||
bool complete = false;
|
||||
const TransactionError err = pwallet->FillPSBT(psbtx, complete, SIGHASH_DEFAULT, false /* sign */, true /* bip32derivs */);
|
||||
const TransactionError err = pwallet->FillPSBT(psbtx, complete, SIGHASH_DEFAULT, /*sign=*/false, /*bip32derivs=*/true);
|
||||
CHECK_NONFATAL(err == TransactionError::OK);
|
||||
CHECK_NONFATAL(!complete);
|
||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
|
||||
|
|
|
@ -614,7 +614,7 @@ RPCHelpMan listsinceblock()
|
|||
blockId = ParseHashV(request.params[0], "blockhash");
|
||||
height = int{};
|
||||
altheight = int{};
|
||||
if (!wallet.chain().findCommonAncestor(blockId, wallet.GetLastBlockHash(), /* ancestor out */ FoundBlock().height(*height), /* blockId out */ FoundBlock().height(*altheight))) {
|
||||
if (!wallet.chain().findCommonAncestor(blockId, wallet.GetLastBlockHash(), /*ancestor_out=*/FoundBlock().height(*height), /*block1_out=*/FoundBlock().height(*altheight))) {
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found");
|
||||
}
|
||||
}
|
||||
|
@ -642,7 +642,7 @@ RPCHelpMan listsinceblock()
|
|||
const CWalletTx& tx = pairWtx.second;
|
||||
|
||||
if (depth == -1 || abs(wallet.GetTxDepthInMainChain(tx)) < depth) {
|
||||
ListTransactions(wallet, tx, 0, true, transactions, filter, nullptr /* filter_label */, /*include_change=*/include_change);
|
||||
ListTransactions(wallet, tx, 0, true, transactions, filter, /*filter_label=*/nullptr, /*include_change=*/include_change);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -659,7 +659,7 @@ RPCHelpMan listsinceblock()
|
|||
if (it != wallet.mapWallet.end()) {
|
||||
// We want all transactions regardless of confirmation count to appear here,
|
||||
// even negative confirmation ones, hence the big negative.
|
||||
ListTransactions(wallet, it->second, -100000000, true, removed, filter, nullptr /* filter_label */, /*include_change=*/include_change);
|
||||
ListTransactions(wallet, it->second, -100000000, true, removed, filter, /*filter_label=*/nullptr, /*include_change=*/include_change);
|
||||
}
|
||||
}
|
||||
blockId = block.hashPrevBlock;
|
||||
|
@ -777,7 +777,7 @@ RPCHelpMan gettransaction()
|
|||
WalletTxToJSON(*pwallet, wtx, entry);
|
||||
|
||||
UniValue details(UniValue::VARR);
|
||||
ListTransactions(*pwallet, wtx, 0, false, details, filter, nullptr /* filter_label */);
|
||||
ListTransactions(*pwallet, wtx, 0, false, details, filter, /*filter_label=*/nullptr);
|
||||
entry.pushKV("details", details);
|
||||
|
||||
std::string strHex = EncodeHexTx(*wtx.tx, pwallet->chain().rpcSerializationFlags());
|
||||
|
|
|
@ -636,7 +636,7 @@ std::optional<SelectionResult> AutomaticCoinSelection(const CWallet& wallet, Coi
|
|||
// If partial groups are allowed, relax the requirement of spending OutputGroups (groups
|
||||
// of UTXOs sent to the same address, which are obviously controlled by a single wallet)
|
||||
// in their entirety.
|
||||
if (auto r6{AttemptSelection(wallet, value_to_select, CoinEligibilityFilter(0, 1, max_ancestors-1, max_descendants-1, true /* include_partial_groups */),
|
||||
if (auto r6{AttemptSelection(wallet, value_to_select, CoinEligibilityFilter(0, 1, max_ancestors-1, max_descendants-1, /*include_partial=*/true),
|
||||
available_coins, coin_selection_params, /*allow_mixed_output_types=*/true)}) {
|
||||
return r6;
|
||||
}
|
||||
|
@ -644,7 +644,7 @@ std::optional<SelectionResult> AutomaticCoinSelection(const CWallet& wallet, Coi
|
|||
// received from other wallets.
|
||||
if (coin_control.m_include_unsafe_inputs) {
|
||||
if (auto r7{AttemptSelection(wallet, value_to_select,
|
||||
CoinEligibilityFilter(0 /* conf_mine */, 0 /* conf_theirs */, max_ancestors-1, max_descendants-1, true /* include_partial_groups */),
|
||||
CoinEligibilityFilter(/*conf_mine=*/0, /*conf_theirs=*/0, max_ancestors-1, max_descendants-1, /*include_partial=*/true),
|
||||
available_coins, coin_selection_params, /*allow_mixed_output_types=*/true)}) {
|
||||
return r7;
|
||||
}
|
||||
|
@ -654,7 +654,7 @@ std::optional<SelectionResult> AutomaticCoinSelection(const CWallet& wallet, Coi
|
|||
// OutputGroups use heuristics that may overestimate ancestor/descendant counts.
|
||||
if (!fRejectLongChains) {
|
||||
if (auto r8{AttemptSelection(wallet, value_to_select,
|
||||
CoinEligibilityFilter(0, 1, std::numeric_limits<uint64_t>::max(), std::numeric_limits<uint64_t>::max(), true /* include_partial_groups */),
|
||||
CoinEligibilityFilter(0, 1, std::numeric_limits<uint64_t>::max(), std::numeric_limits<uint64_t>::max(), /*include_partial=*/true),
|
||||
available_coins, coin_selection_params, /*allow_mixed_output_types=*/true)}) {
|
||||
return r8;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ BOOST_FIXTURE_TEST_CASE(SubtractFee, TestChain100Setup)
|
|||
// leftover input amount which would have been change to the recipient
|
||||
// instead of the miner.
|
||||
auto check_tx = [&wallet](CAmount leftover_input_amount) {
|
||||
CRecipient recipient{GetScriptForRawPubKey({}), 50 * COIN - leftover_input_amount, true /* subtract fee */};
|
||||
CRecipient recipient{GetScriptForRawPubKey({}), 50 * COIN - leftover_input_amount, /*subtract_fee=*/true};
|
||||
constexpr int RANDOM_CHANGE_POSITION = -1;
|
||||
CCoinControl coin_control;
|
||||
coin_control.m_feerate.emplace(10000);
|
||||
|
|
|
@ -587,7 +587,7 @@ BOOST_FIXTURE_TEST_CASE(ListCoinsTest, ListCoinsTestingSetup)
|
|||
// returns the coin associated with the change address underneath the
|
||||
// coinbaseKey pubkey, even though the change address has a different
|
||||
// pubkey.
|
||||
AddTx(CRecipient{GetScriptForRawPubKey({}), 1 * COIN, false /* subtract fee */});
|
||||
AddTx(CRecipient{GetScriptForRawPubKey({}), 1 * COIN, /*subtract_fee=*/false});
|
||||
{
|
||||
LOCK(wallet->cs_wallet);
|
||||
list = ListCoins(*wallet);
|
||||
|
|
|
@ -1411,7 +1411,7 @@ void CWallet::blockConnected(const interfaces::BlockInfo& block)
|
|||
m_last_block_processed = block.hash;
|
||||
for (size_t index = 0; index < block.data->vtx.size(); index++) {
|
||||
SyncTransaction(block.data->vtx[index], TxStateConfirmed{block.hash, block.height, static_cast<int>(index)});
|
||||
transactionRemovedFromMempool(block.data->vtx[index], MemPoolRemovalReason::BLOCK, 0 /* mempool_sequence */);
|
||||
transactionRemovedFromMempool(block.data->vtx[index], MemPoolRemovalReason::BLOCK, /*mempool_sequence=*/0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2463,7 +2463,7 @@ bool CWallet::TopUpKeyPool(unsigned int kpSize)
|
|||
util::Result<CTxDestination> CWallet::GetNewDestination(const OutputType type, const std::string label)
|
||||
{
|
||||
LOCK(cs_wallet);
|
||||
auto spk_man = GetScriptPubKeyMan(type, false /* internal */);
|
||||
auto spk_man = GetScriptPubKeyMan(type, /*internal=*/false);
|
||||
if (!spk_man) {
|
||||
return util::Error{strprintf(_("Error: No %s addresses available."), FormatOutputType(type))};
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ static const std::shared_ptr<CWallet> MakeWallet(const std::string& name, const
|
|||
}
|
||||
|
||||
// dummy chain interface
|
||||
std::shared_ptr<CWallet> wallet_instance{new CWallet(nullptr /* chain */, name, args, std::move(database)), WalletToolReleaseWallet};
|
||||
std::shared_ptr<CWallet> wallet_instance{new CWallet(/*chain=*/nullptr, name, args, std::move(database)), WalletToolReleaseWallet};
|
||||
DBErrors load_wallet_ret;
|
||||
try {
|
||||
load_wallet_ret = wallet_instance->LoadWallet();
|
||||
|
|
Loading…
Add table
Reference in a new issue