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

BIP 125 selection for replacement #57

Open
monokh opened this issue Apr 23, 2020 · 2 comments
Open

BIP 125 selection for replacement #57

monokh opened this issue Apr 23, 2020 · 2 comments

Comments

@monokh
Copy link

monokh commented Apr 23, 2020

Replace by fee BIP125 states that at least one input in the transaction needs to be reused in the replacing transaction. Is this something this library should cater for? Such that you also provide the inputs from the previous transaction and the coin selection will ensure that at least one of them is used.

Alternatively are there any workarounds for using this library for RBF transactions?

@monokh
Copy link
Author

monokh commented Apr 24, 2020

I found that I could use coinselect/accumulative pretty reliably to achieve this if I prioritised the utxos spent in the previous transaction before sending to 'coinselect'. However there probably should be something to 100% guarantee that those prioritised inputs aren't skipped.

@spencerstock
Copy link

Agree that this should be prioritized. I wrote something to accomplish this in Coinbase Wallet's codebase. If you only use accumulative for the original and for the replacement it should work 100% of the time already, as long as you guarantee the inputs are the same when both transactions are generated.

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

No branches or pull requests

2 participants