bench: drop duplicate balance benchmark
What changed, and why it matters
This commit removes a duplicate benchmark test in Bitcoin Core. The 'WalletBalanceMine' benchmark was identical to 'WalletBalanceClean', so registering it twice served no purpose. This change only affects internal performance testing code and has no impact on the actual Bitcoin wallet software or its users.
No security action needed. This is a benign benchmark cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change deletes a duplicate static function WalletBalanceMine and its BENCHMARK registration in src/bench/wallet_balance.cpp. Both WalletBalanceClean and WalletBalanceMine invoked WalletBalance(bench, /*set_dirty=*/false, /*add_mine=*/true) with identical parameters, making them redundant. This is a code cleanup in benchmark infrastructure only.
Changed components
src/bench/wallet_balance.cppInspect captured patch +0 / −2
diff --git a/src/bench/wallet_balance.cpp b/src/bench/wallet_balance.cpp
index 45f23494..d9cd4bbb 100644
--- a/src/bench/wallet_balance.cpp
+++ b/src/bench/wallet_balance.cpp
@@ -62,11 +62,9 @@ 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); }
BENCHMARK(WalletBalanceDirty);
BENCHMARK(WalletBalanceClean);
-BENCHMARK(WalletBalanceMine);
BENCHMARK(WalletBalanceWatch);
} // namespace wallet
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.