Open jholdstock opened 4 years ago
This is an issue with our reorg handling under the rpc syncer (the syncers themselves are responsible with providing the relevant txs for blocks they are trying to attach). When a block is reorged out of the main chain, and a later reorg adds it back in, the relevant txs from this block are not recorded in the wallet any longer.
I own the address
TsiYnTiBdVshdDTMi4P88v4WrHUUDv3Updx
which I have used for mining on testnet. Occasionally I will receive transactions which I am then unable to spend.For example,
dc98c495538d5c2b412da8265a83134746c74529db553ab7f78e8df1440b4360
pays to my address, and I see a dcrwallet log line indicating so:However, upon an attempt to spend the output ~20 minutes later I get:
The wallet was running non-stop throughout this period. The outputs received in transactions immediately before this one, and immediately after this one, are both spendable.
Providing the full log for this time period here: https://pastebin.com/TxZTNJ8b. It may be note-worthy that the log line indicating the output is spendable actually appeared twice, apparently due to a re-org.
Transaction is not returned when querying the wallet with dcrctl:
The above behaviour was seen on dcrwallet release 1.5.1, built from source locally. The issue is resolved by a wallet rescan - the transaction can be retrieved using
gettransaction
and the output becomes spendable.