You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TxGraph needs to have the prev txouts of a given tx to calculate the fee. Right now, when we sync/scan from our data source crates (esplora/electrum), these txouts are NOT obtained.
Some users would like to be able to calculate the fee for every full tx in the graph.
Thank you to @afilini for pointing this problem out to me.
Proposal
Add TxGraph::missing_prev_txouts method.
pubfnmissing_prev_txouts(&self) -> implIterator<Item = OutPoint>{/* TODO */}
Add fetch_txouts_only (better name?) method to EsploraExt and ElectrumExt. This is different to using scan_without_keychain with outpoints set. The intention here is to get partial transactions.
So this problem is restricted to electrum and block scanning apis. With electrum I think we can just have a enum flag to decide whether we fetch all inputs and whether we fetch the full input tx or we fetch it and then prune to relevant txouts (or none at all).
With block scanning we cannot easily go back in time and look things up so you just have to accept the limitation: you will not know the tx fee of transactions spending to you that did not have an input that originated from your wallet.
We also should add a method to Wallet: add_txout(&mut self, outpoint: OutPoint, txout: TxOut), for users who would like to add arbitrary txouts.
Description
The
TxGraph
needs to have the prev txouts of a given tx to calculate the fee. Right now, when we sync/scan from our data source crates (esplora/electrum), these txouts are NOT obtained.Some users would like to be able to calculate the fee for every full tx in the graph.
Thank you to @afilini for pointing this problem out to me.
Proposal
Add
TxGraph::missing_prev_txouts
method.Add
fetch_txouts_only
(better name?) method toEsploraExt
andElectrumExt
. This is different to usingscan_without_keychain
withoutpoints
set. The intention here is to get partial transactions.We also should add a method to
Wallet
:add_txout(&mut self, outpoint: OutPoint, txout: TxOut)
, for users who would like to add arbitrary txouts.Further Notes
Let's move forward with this once everyone comes to consensus as to what is needed.
The text was updated successfully, but these errors were encountered: