lock inputs via strategies and unlock early due to payment anxiety#8
Open
Mshehu5 wants to merge 1 commit intopayjoin:masterfrom
Open
lock inputs via strategies and unlock early due to payment anxiety#8Mshehu5 wants to merge 1 commit intopayjoin:masterfrom
Mshehu5 wants to merge 1 commit intopayjoin:masterfrom
Conversation
425cef2 to
bb8c115
Compare
655eff5 to
9c8ae45
Compare
arminsabouri
requested changes
Mar 2, 2026
| fn unspent_coins(&self) -> impl Iterator<Item = OutputHandle<'a>> + '_ { | ||
| self.potentially_spendable_txos().filter(|o| { | ||
| !self.info().unconfirmed_spends.contains(&o.outpoint()) | ||
| // TODO Startegies should inform which inputs can be spendable. |
Collaborator
There was a problem hiding this comment.
I realize this may have been misleading. Wallets should mark utxos as locked as secondary information (WalletInfo). Perhaps a better name for it could be: "used_utxos". This information should not live in the strategy struct
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this PR aims to address two TODO in unspent coin wallet.rs L159-160
// TODO Startegies should inform which inputs can be spendable.
// TODO: these inputs should unlock if the payjoin is expired or the associated payment obligation is due soon (i.e payment anxiety)
coins are now locked when used by a strategy and unlock when expired or due to payment anxiety(payment obligation almost due) which is currently implemented as if less than 10% of your deadline window remains this will unlock the coins. This threshold can be changed as is just a value