Issue Details

Number
26317
Title
avoid_reuse=true is incorrectly skipping one of my UXTOs
Description
I noticed that the sum of my unspent outputs is greater than my balance. Upon investigating it turns out that this is because one of my outputs is marked as "used", even though it hasn't been. Tracing through the execution I see that `CWallet::IsSpentKey()` is returning here: if (IsAddressUsed(dest)) { return true; } and `IsAddressUsed()` is looking for key `used` in the address book for that address, and presumably finding it. The address of the UTXO in question only has a single transaction, creating my UTXO. The address isn't reused, and no other address with the same public key is used either. The UTXO was created in Feb 2020 and I've used many different versions of Bitcoin Core since then, so I don't know when or why the UTXO's address was marked as "used". Could it be that I made a transaction that spent that UTXO but the transaction never confirmed and I later "zapped" it? Or RBF'ed it, causing different inputs to be used?
URL
https://github.com/bitcoin/bitcoin/issue/26317
Closed by
Back to List