wallet: feebumper, fix crash when combined bump fee is unavailable #34870

pull furszy wants to merge 1 commits into bitcoin:master from furszy:2026_feebumper_crash_fix changing 1 files +2 −1
  1. furszy commented at 7:08 pm on March 19, 2026: member

    When a large cluster of unconfirmed transactions exceeds the limit, calculateCombinedBumpFee() returns std::nullopt.

    Previously, we continued executing and the optional value was accessed unconditionally, leading to a std::bad_optional_access exception (https://en.cppreference.com/w/cpp/utility/optional/value.html).

    Fix this by returning early when the bumped fee is null.

    Note: This is a crash for the GUI, and an uncaught exception for the RPC bumpfee and psbtbumpfee.

  2. DrahtBot added the label Wallet on Mar 19, 2026
  3. DrahtBot commented at 7:08 pm on March 19, 2026: contributor

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK luke-jr, rkrux, achow101

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  4. wallet: feebumper, fix crash when combined bump fee is unavailable
    When a large cluster of unconfirmed transactions exceeds the limit,
    calculateCombinedBumpFee() returns std::nullopt.
    
    Previously, we continued executing and the optional value was
    accessed unconditionally, leading to a std::bad_optional_access
    exception.
    
    Fix this by returning early when the returned bumped fee is null.
    
    Note:
    This is a crash for the GUI, and an uncaught exception for the RPC
    bumpfee and psbtbumpfee.
    6072a2a6a1
  5. furszy force-pushed on Mar 19, 2026
  6. DrahtBot added the label CI failed on Mar 19, 2026
  7. DrahtBot removed the label CI failed on Mar 19, 2026
  8. luke-jr approved
  9. luke-jr commented at 3:11 pm on March 20, 2026: member
    utACK 6072a2a6a1fdde8444e3515f0d201de3fb3923a1
  10. rkrux commented at 1:38 pm on March 23, 2026: contributor

    crACK 6072a2a6a1fdde8444e3515f0d201de3fb3923a1 based on returning before accessing the null optional.

    When a large cluster of unconfirmed transactions exceeds the limit, calculateCombinedBumpFee() returns std::nullopt.

    The error message caught my eye because it is dependent on the optional being empty, which is an underlying assumption made by the code. Nothing needs to changed for it in this PR but I found it noteworthy.

    Some more investigation showed me there is no test coverage for this conditional, so I created a (relatively) good first issue for it here: #34902.

  11. achow101 commented at 0:44 am on March 24, 2026: member
    ACK 6072a2a6a1fdde8444e3515f0d201de3fb3923a1
  12. achow101 merged this on Mar 24, 2026
  13. achow101 closed this on Mar 24, 2026

  14. furszy deleted the branch on Mar 24, 2026
  15. fanquake referenced this in commit 87d1691f3e on Mar 24, 2026
  16. fanquake commented at 2:27 am on March 24, 2026: member
    Backported to 31.x in #34800.
  17. fanquake referenced this in commit 84c2f003b3 on Mar 24, 2026
  18. fanquake commented at 2:31 am on March 24, 2026: member
    Backported to 30.x in #34856.

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-03-24 03:12 UTC

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