-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
key-wallet-manager never sets Utxo::is_instantlocked = true, causing CoinSelector to reject all mempool UTXOs as unspendable — even those with InstantSend locks.
Details
The UTXO spendability check (key-wallet/src/utxo.rs)
pub fn is_spendable(&self, current_height: u32) -> bool {
if self.is_locked { return false; }
if !self.is_coinbase {
self.is_confirmed || self.is_instantlocked // ← requires one of these
} else {
current_height >= self.height + 100
}
}What's set
| Flag | Older revisions (e.g. 0bc6592) |
Newer revisions (e.g. 2bd764f, PR #411) |
|---|---|---|
is_confirmed |
❌ Never set | ✅ Set via context.confirmed() for block-included txs |
is_instantlocked |
❌ Never set | ❌ Still never set |
Searching the entire codebase for is_instantlocked = true returns zero matches.
Impact
- Mempool UTXOs with IS-locks are never marked as
is_instantlocked = true CoinSelectorfilters them out → "No UTXOs available for selection"- Users see wallet balance but cannot spend until the tx is mined into a block
- On older revisions (pre-feat: rewrite, fix and improve the sync architecture #411), all UTXOs are unspendable since
is_confirmedwasn't set either
Expected behavior
When the wallet manager processes an InstantSend lock for a transaction, it should set is_instantlocked = true on the corresponding UTXOs, making them immediately spendable per the is_spendable() logic.
Workaround
In dash-evo-tool, we work around this by patching cloned UTXOs before passing them to CoinSelector:
// Workaround: infer spendability from block inclusion
if utxo.height > 0 {
utxo.is_confirmed = true; // mined in a block
} else {
utxo.is_instantlocked = true; // assume IS-locked for mempool txs
}This is imprecise — it assumes all mempool transactions are IS-locked — but is the only option until the upstream properly tracks IS-lock status.
Versions affected
key-wallet0.42.0 at0bc6592— both flags brokenkey-wallet0.42.0 at2bd764f—is_confirmedfixed,is_instantlockedstill broken
🤖 Co-authored by Claudius the Magnificent AI Agent
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working