wallet: handle bump fee calculation failure #35341

pull fallintoplace wants to merge 1 commits into bitcoin:master from fallintoplace:wallet-bump-fee-failure changing 10 files +151 −32
  1. fallintoplace commented at 10:50 PM on May 20, 2026: none

    Fixes #29711.

    When MiniMiner cannot calculate bump fees for requested unconfirmed outpoints, for example because GatherClusters() returns an empty cluster after hitting its 500 transaction cutoff, wallet callers can receive an empty bump-fee map and should not index it with map::at.

    This change:

    • keeps calculateIndividualBumpFees() returning its existing map type
    • treats an empty bump-fee map for non-empty requested outpoints as a calculation failure
    • propagates the failure through AvailableCoins() as util::Result<CoinsResult>
    • returns the existing wallet bump-fee error from transaction creation and sendall paths instead of surfacing map::at or silently treating failure as zero bump fee
    • updates no-feerate callers, tests, and wallet benchmarks for the new result type
    • adds MiniMiner and functional wallet regressions for the enormous-cluster case

    This overlaps with #34698, but keeps the patch aligned with the maintainer feedback there by avoiding chain-interface churn.

    Testing:

    • git diff --check
    • cmake --build build-wallet-bump-fee --target test_bitcoin bench_bitcoin -j $(sysctl -n hw.ncpu)
    • build-wallet-bump-fee/bin/test_bitcoin --run_test=miniminer_tests,spend_tests,wallet_tests
    • cmake --build build-wallet-bump-fee --target bitcoind bitcoin-cli -j $(sysctl -n hw.ncpu)
    • python3 build-wallet-bump-fee/test/functional/test_runner.py wallet_spend_unconfirmed.py
    • build-wallet-bump-fee/bin/test_bitcoin
    • build-wallet-bump-fee/bin/bench_bitcoin -filter="WalletAvailableCoins|WalletCreateTxUseOnlyPresetInputs|WalletCreateTxUsePresetInputsAndCoinSelection" -sanity-check
  2. DrahtBot added the label Wallet on May 20, 2026
  3. DrahtBot commented at 10:50 PM on May 20, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35341.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. wallet: handle bump fee calculation failure 06e7e4e6c4
  5. fallintoplace force-pushed on May 20, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-21 00:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me