2e76bcd159
Notifications ariving from btcd were being reordered (each handled by its own goroutine, rather then being always sent in the order they originated). This was breaking the new transaction store by inserting transaction records in an 'impossible' manner, that is, inserting txs without block info after the store already held records of the same tx with block info, without first performing a rollback. This is handled by the transaction store insert methods by checking for identical transactions (double spends with the same tx sha), but where the block heights mismatch and the new record does not have a block set. The error is returned all the way up to the goroutine running each rpc request/notification handler, and if hit, the btcd connection is closed and all accounts are reopened from disk. This is not optimal, but it allows us to use the connect logic to correctly catch us up to the best chain with the last good state of all accounts while only rescanning a few blocks. Fixes #72. |
||
---|---|---|
.. | ||
fixedIO_test.go | ||
tx.go | ||
tx_test.go |