Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Bump Fee #445

Merged
merged 1 commit into from
Dec 27, 2023
Merged

Fix Bump Fee #445

merged 1 commit into from
Dec 27, 2023

Conversation

crisdut
Copy link
Member

@crisdut crisdut commented Dec 27, 2023

Description

After investigating the error in create_bdk_rbf_transaction, I noticed the strange behavior in the BDK rbf method. When we create a transaction builder from the Wallet::build_fee_bump method with descriptor and change_descriptor, the BDK gets all outputs recipients, including "final change output", and this avoids BDK apply replace by fee policy.

For example,
Suppose you have 100.000 sats and create a new transaction, sending 10.000 sats to the address; the BDK generates the following transaction:

In (1): 100.000
out (1): 10.000
out (2): 98.000

fee: 1.000

When we try to send a new transaction with descriptor and change_descriptor, the BDK retrieves both outs instead of only the first out (10.000 sats). Then, BDK raises an inflation exception.

@cryptoquick
Copy link
Member

Interesting... Good to know.

@cryptoquick
Copy link
Member

Thank you for looking into this!

@cryptoquick cryptoquick merged commit 6edcb7a into HB/rbf Dec 27, 2023
4 of 5 checks passed
@cryptoquick cryptoquick deleted the CD/rbf branch December 27, 2023 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants