-
Notifications
You must be signed in to change notification settings - Fork 321
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
Option for Electrum and Esplora APIs to include floating TxOut
s in updates for fee calculation
#1265
Comments
In esplora it should not be an option it just should be done. The information is already fetched it just isn't inserted. With electrum I guess you have to make it an option. |
That's a good point @LLFourn. Should be straightforward for Esplora then. |
I can take a look at this. |
…tion 552f11c feat(esplora): include previous `TxOut`s for fee calculation The previous `TxOut` for transactions received from an external wallet are added as floating `TxOut`s to `TxGraph` to allow for fee calculation. (Wei Chen) Pull request description: ### Description Partially implements #1265. The previous `TxOut` for transactions received from an external wallet are added as floating `TxOut`s to `TxGraph` to allow for fee calculation. ### Notes to the reviewers Currently only the `esplora` portion of #1265 has been implemented. The `electrum` portion will potentially be done in a new PR, as discussed on the 1/30/24 Lib call. ### Checklists #### To Do: * [ ] Implement `electrum` portion of #1265. #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### New Features: * [x] I've added tests for the new feature * [x] I've added docs for the new feature ACKs for top commit: evanlinjin: re-ACK 552f11c danielabrozzoni: ACK 552f11c Tree-SHA512: 752a24ebd0b9ad7952c1b093ecb251473e346c77b860c1a80c73418130189227405a0f0d7652967cf8c7b89994e8c37df96cd52b52b6daff9cc8c88b5194069a
possibly related #1419 |
@LagginTimes will also implement this for Electrum. |
The |
Describe the enhancement
BDK does not store the transaction fee in a separate field. It needs to be calculated from the difference between prev outputs and outputs created.
For transactions that are received from an external wallet, we would not have prev txout data by default. It'll be handy to have an option to get prev txouts for these transactions and have them inserted as floating txouts in the
TxGraph
.Use case
Some wallets would want to be able to calculate fees for all transactions that it includes.
Additional context
The text was updated successfully, but these errors were encountered: