When MiniMiner cannot calculate individual bump fees (e.g. cluster processing aborts), wallet funding paths can index missing bump-fee entries and return map::at to users.
This patch makes that failure explicit and propagates it as a wallet error.
What changes
MiniMiner::CalculateBumpFeesnow returnsstd::optional<std::map<COutPoint, CAmount>>instead of an always-present map.interfaces::Chain::calculateIndividualBumpFeesis updated to match.- Wallet funding paths now handle this failure and return the existing descriptive error:
send/ normal wallet transaction funding pathsendallpath
- Added a functional regression test in
wallet_spend_unconfirmed.pythat:- reproduces the large unconfirmed-set scenario from #29711,
- asserts the descriptive error instead of
map::at, - verifies spending works again after mining a block.
Why this is correct
The previous behavior treated an absent bump-fee result as a map and indexed into it. This patch makes the failure state explicit at the interface boundary and checks it at wallet call sites before indexing.
This keeps behavior unchanged in successful cases, and only changes the error path from an internal exception (map::at) to the intended wallet-level error.
Test plan
build-local/test/functional/test_runner.py wallet_spend_unconfirmed.py -j 1build-local/test/functional/test_runner.py wallet_sendall.py -j 1build-tsan/bin/test_bitcoin --run_test=miniminer_tests --catch_system_errors=nobuild-tsan/bin/test_bitcoin --run_test=spend_tests --catch_system_errors=nobuild-tsan/bin/test_bitcoin --run_test=coinselector_tests/bump_fee_test --catch_system_errors=nopython3 test/lint/lint-python.pypython3 test/lint/lint-tests.pypython3 test/lint/lint-files.pypython3 test/lint/lint-includes.py
Fixes #29711.