This PR introduces a new benchmark that measures GetBalance() performance on wallets with extensive transaction history where the majority of outputs have already been spent.
It was created to test #27865, which separates spent TXOs from spendable ones. This pattern mirrors real-world usage in high-activity wallets such as Lightning nodes, exchanges, hot wallets, and payment processors.
Setup:
- Creates 500 blocks × 100 coinbase outputs = 50,000 wallet TXOs
- Matures all coinbases with COINBASE_MATURITY additional blocks
- Spends 49,950 outputs in batched transactions (confirmed in blocks)
- Consolidation outputs go to a burn script to avoid inflating wallet TXO count
To keep the setup time reasonable, the benchmark uses the fast “fake block” approach, similar to wallet_create_tx.cpp.