dcrdex
dcrdex copied to clipboard
client/asset/btc: Identify unknown transactions
This diff updates the btc wallet to identify all past transactions that
the wallet has made. This way, if dexc is reinitalized with a seed that
was already used, the transaction history of native wallets can be
recovered. When an RPC wallet is connected, the transaction history prior
to connecting will be displayed.
The SPV wallet uses the `GetTransactions` method to retrieve unknown
transactions rather than `ListSinceBlock` as was previously used to get
incoming transactions. This is because `ListSinceBlock` does not include
incoming transactions that pay to a change address, which is done by
redemption and refund transactions. The RPC wallet continues to use the
listsinceblock RPC call.
During initial syncing of the transaction history, the wallet does not
send notifications to the front end each time it discovers a new
transaction. Instead, a notification that the syncing has complete is sent
to the front end.
Comes on top of #2693 and builds on #2694
@buck54321 This PR comes on top of https://github.com/decred/dcrdex/pull/2693. For this one I was only going to do identifying BTC transactions, then I'll add another PR for DCR later. Let's merge #2693 first, then I'll rebase this one.