Open LLFourn opened 1 year ago
Let me look into this instead
HI @LLFourn! @evanlinjin was proposing that we add this feature as part of the transaction building logic given that we are going to do coins filtering/grouping already there. I personally don't know what is the best way to go about this. I wanted to check in with you and see what you think.
Transaction building is about choosing utxos that you want to use. Once you choose them you'll mark_spent
them before finally broadcasting the transaction so other parts of the application don't try and use them I imagine. It seems like this API is useful in any context.
KeychainTracker
should havemark_spent
andunmark_spent
that work in a similar way tomark_used
andunmark_used
in `KeychainTxOutIndex. The reason we want this is to be able to "reserve" utxos so other threads cannot use them when we've decide to construct a transaction using them.See https://github.com/bitcoindevkit/bdk/issues/849 also