wallet: For feebump, ignore abandoned descendant spends #26675

pull john-moffett wants to merge 1 commits into bitcoin:master from john-moffett:2022_12_Bumpfee_ignore_abandoned changing 2 files +31 −2
  1. john-moffett commented at 7:08 pm on December 9, 2022: contributor

    Closes #26667

    To be eligible for fee-bumping, a transaction must not have any of its outputs (eg - change) spent in other unconfirmed transactions in the wallet. This behavior is currently enforced and tested.

    However, this check shouldn’t apply to spends in abandoned descendant transactions, as explained by #26667.

    CWallet::IsSpent already carves out an exception for abandoned transactions, so we can just use that.

    I’ve also added a new test to cover this case.

  2. DrahtBot commented at 7:08 pm on December 9, 2022: 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 Sjors, furszy, achow101

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. DrahtBot added the label Wallet on Dec 9, 2022
  4. fanquake requested review from Sjors on Dec 10, 2022
  5. fanquake added the label Needs backport (24.x) on Dec 10, 2022
  6. in test/functional/wallet_bumpfee.py:298 in 7c325c2837 outdated
    293+    # Find change output
    294+    output_list = rbf_node.getrawtransaction(parent_id, 1)["vout"]
    295+    change_output = next(o for o in output_list if o["value"] == Decimal("0.00049000"))
    296+
    297+    # Submit child transaction with low fee
    298+    child = rbf_node.createrawtransaction([{"txid": parent_id, "vout": change_output["n"]}], {dest_address: 0.0004850})
    


    Sjors commented at 10:31 pm on December 12, 2022:
    Might be easier to use the send RPC?

    john-moffett commented at 9:18 pm on December 14, 2022:
    Happy to change it, but I picked this because send is marked as “EXPERIMENTAL warning: this call may be changed in future releases”. I do see other uses of it in tests, though.

    Sjors commented at 6:37 pm on December 15, 2022:
    I think it’s fine to use it in tests. If we ever change the interface, we’ll have to refactor the test.

    john-moffett commented at 7:45 pm on December 15, 2022:
    Great. I updated the test to use send and it did end up simplifying the test code a bit. Thanks!
  7. Sjors approved
  8. Sjors commented at 10:33 pm on December 12, 2022: member

    utACK 7c325c28372d75f32425f9d35d455b2d5750d4b8

    (I also checked that the test fails without the change in HasWalletSpend())

  9. onyeali501 approved
  10. achow101 commented at 8:44 pm on December 13, 2022: member
    ACK 7c325c28372d75f32425f9d35d455b2d5750d4b8
  11. For feebump, ignore abandoned descendant spends
    To be eligible for fee-bumping, a transaction must not have any
    of its outputs (eg - change) spent in other unconfirmed transactions
    in the wallet. However, this check should not apply to abandoned
    transactions.
    
    A new test case is added to cover this case.
    f9ce0eadf4
  12. john-moffett force-pushed on Dec 15, 2022
  13. Sjors commented at 8:28 pm on December 15, 2022: member
    re-utACK f9ce0eadf4eb58d1e2207c27fabe69a5642482e7
  14. furszy approved
  15. furszy commented at 7:42 pm on December 29, 2022: member
    ACK f9ce0ead
  16. maflcko assigned achow101 on Dec 29, 2022
  17. achow101 commented at 11:18 pm on January 11, 2023: member
    ACK f9ce0eadf4eb58d1e2207c27fabe69a5642482e7
  18. achow101 merged this on Jan 11, 2023
  19. achow101 closed this on Jan 11, 2023

  20. fanquake referenced this in commit 6a7b253056 on Jan 12, 2023
  21. fanquake commented at 9:58 am on January 12, 2023: member
    Backported in #26878.
  22. fanquake removed the label Needs backport (24.x) on Jan 12, 2023
  23. fanquake referenced this in commit 91f702160a on Jan 12, 2023
  24. sidhujag referenced this in commit f979b164b0 on Jan 12, 2023
  25. fanquake referenced this in commit 5c824ac5e1 on Feb 22, 2023
  26. glozow referenced this in commit c8c85ca16e on Feb 27, 2023
  27. bitcoin locked this on Jan 12, 2024

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: 2024-11-21 21:12 UTC

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