Branch: refs/heads/master
Home: https://github.com/conformal/btcwallet
Commit: 503f591e8818f7bc579862e7e842ffdde0347de0
https://github.com/conformal/btcwallet/commit/503f591e8818f7bc579862e7e842ffdde0347de0
Author: Josh Rickmar <[email protected]>
Date: 2013-11-12 (Tue, 12 Nov 2013)
Changed paths:
M cmd.go
M cmdmgr.go
M disksync.go
M sockets.go
Log Message:
-----------
Process tx notifications before new blocks.
This change modifies the order in which transaction to watched
addresses are processed and when frontend notifications occur. Due to
btcd notifying all transactions before sending the blockconnected
notification, the UTXO and transaction stores can be modified without
sending any frontend notifications, and then a single frontend
notification is sent when the blockconnected notification arrives.
The order in which each file is synced to disk was also changed to
write out the UTXO and transaction stores before writing the wallet.
This is to prevent a race where wallet closes after writing the dirty
wallet, but before the dirty UTXO store is written. In this
situation, newly added UTXOs will be missed and not found again on the
next wallet open during the rescan. Writing the wallet (which holds
the synced-to-block information) last prevents this.
An issue where the unconfirmed change UTXO created from a new
transaction never being properly notified to frontends is fixed now as
well.