mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-04 19:08:51 +02:00
refactor: fix clang-tidy named args usage
This commit is contained in:
@@ -101,7 +101,7 @@ static void AddrManGetAddr(benchmark::Bench& bench)
|
||||
FillAddrMan(addrman);
|
||||
|
||||
bench.run([&] {
|
||||
const auto& addresses = addrman.GetAddr(/* max_addresses */ 2500, /* max_pct */ 23, /* network */ std::nullopt);
|
||||
const auto& addresses = addrman.GetAddr(/*max_addresses=*/2500, /*max_pct=*/23, /*network=*/std::nullopt);
|
||||
assert(addresses.size() > 0);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ static void ComplexMemPool(benchmark::Bench& bench)
|
||||
if (bench.complexityN() > 1) {
|
||||
childTxs = static_cast<int>(bench.complexityN());
|
||||
}
|
||||
std::vector<CTransactionRef> ordered_coins = CreateOrderedCoins(det_rand, childTxs, /* min_ancestors */ 1);
|
||||
std::vector<CTransactionRef> ordered_coins = CreateOrderedCoins(det_rand, childTxs, /*min_ancestors=*/1);
|
||||
const auto testing_setup = MakeNoLogFileContext<const TestingSetup>(CBaseChainParams::MAIN);
|
||||
CTxMemPool pool;
|
||||
LOCK2(cs_main, pool.cs);
|
||||
@@ -103,7 +103,7 @@ static void MempoolCheck(benchmark::Bench& bench)
|
||||
{
|
||||
FastRandomContext det_rand{true};
|
||||
const int childTxs = bench.complexityN() > 1 ? static_cast<int>(bench.complexityN()) : 2000;
|
||||
const std::vector<CTransactionRef> ordered_coins = CreateOrderedCoins(det_rand, childTxs, /* min_ancestors */ 5);
|
||||
const std::vector<CTransactionRef> ordered_coins = CreateOrderedCoins(det_rand, childTxs, /*min_ancestors=*/5);
|
||||
const auto testing_setup = MakeNoLogFileContext<const TestingSetup>(CBaseChainParams::MAIN, {"-checkmempool=1"});
|
||||
CTxMemPool pool;
|
||||
LOCK2(cs_main, pool.cs);
|
||||
@@ -111,7 +111,7 @@ static void MempoolCheck(benchmark::Bench& bench)
|
||||
for (auto& tx : ordered_coins) AddTx(tx, pool);
|
||||
|
||||
bench.run([&]() NO_THREAD_SAFETY_ANALYSIS {
|
||||
pool.check(coins_tip, /* spendheight */ 2);
|
||||
pool.check(coins_tip, /*spendheight=*/2);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -29,11 +29,11 @@ static void RpcMempool(benchmark::Bench& bench)
|
||||
tx.vout[0].scriptPubKey = CScript() << OP_1 << OP_EQUAL;
|
||||
tx.vout[0].nValue = i;
|
||||
const CTransactionRef tx_r{MakeTransactionRef(tx)};
|
||||
AddTx(tx_r, /* fee */ i, pool);
|
||||
AddTx(tx_r, /*fee=*/i, pool);
|
||||
}
|
||||
|
||||
bench.run([&] {
|
||||
(void)MempoolToJSON(pool, /*verbose*/ true);
|
||||
(void)MempoolToJSON(pool, /*verbose=*/true);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -52,10 +52,10 @@ static void WalletBalance(benchmark::Bench& bench, const bool set_dirty, const b
|
||||
});
|
||||
}
|
||||
|
||||
static void WalletBalanceDirty(benchmark::Bench& bench) { WalletBalance(bench, /* set_dirty */ true, /* add_mine */ true); }
|
||||
static void WalletBalanceClean(benchmark::Bench& bench) { WalletBalance(bench, /* set_dirty */ false, /* add_mine */ true); }
|
||||
static void WalletBalanceMine(benchmark::Bench& bench) { WalletBalance(bench, /* set_dirty */ false, /* add_mine */ true); }
|
||||
static void WalletBalanceWatch(benchmark::Bench& bench) { WalletBalance(bench, /* set_dirty */ false, /* add_mine */ false); }
|
||||
static void WalletBalanceDirty(benchmark::Bench& bench) { WalletBalance(bench, /*set_dirty=*/true, /*add_mine=*/true); }
|
||||
static void WalletBalanceClean(benchmark::Bench& bench) { WalletBalance(bench, /*set_dirty=*/false, /*add_mine=*/true); }
|
||||
static void WalletBalanceMine(benchmark::Bench& bench) { WalletBalance(bench, /*set_dirty=*/false, /*add_mine=*/true); }
|
||||
static void WalletBalanceWatch(benchmark::Bench& bench) { WalletBalance(bench, /*set_dirty=*/false, /*add_mine=*/false); }
|
||||
|
||||
BENCHMARK(WalletBalanceDirty);
|
||||
BENCHMARK(WalletBalanceClean);
|
||||
|
||||
Reference in New Issue
Block a user