-
Notifications
You must be signed in to change notification settings - Fork 325
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
allow_shrinking not working as expected #1342
Comments
Another bug is that the fee of the replacement tx doesn't satisfy RBF rule 4 (the abs fee is actually lower than the original). This looks like a severe problem. The output ending My 2c is that the builder API here is just not right. A fee bump shouldn't try to interpret the existing transaction and replicate it -- it should just create a tx with the appropriate fee that spends one or more of the existing transaction's outputs. The builder API should just be |
I think the docs on I created #1366 to add a warning to the docs and confirm expected behavior works. See: https://docs.rs/bdk/latest/src/bdk/wallet/tx_builder.rs.html#662-679 |
fixed by #1366 |
Using
build_fee_bump
to replace transaction along withallow_shrinking
results in the specified address output amount increasing and consuming all of the input utxo amount.To Reproduce
Create a transaction with one output ADDRESS and specify an x amount to be sent. sign and broadcast.
Sync wallet. Create a bump fee txbuilder and call allow_shrinking(ADDRESS) and specify a higher feerate fee_rate
Example Code:
Expected behavior
Expect the output ADDRESS to have the same amount or less. Amount will be less if the input transaction cannot cover the fee as well as the originally specified amount for ADDRESS
However output ADDRESS is having a higher amount than the origincal. It is actually consuming all the input amount.
Build environment
Additional context
Original transaction outputs
Transaction outputs after fee bump and allow shrinking:
The text was updated successfully, but these errors were encountered: