Remove CValidationInterface::UpdatedTransaction
commit9fececb2cbabc52cc375b84bf840fac018cc8121
authorMatt Corallo <git@bluematt.me>
Tue, 17 Jan 2017 21:44:25 +0000 (17 16:44 -0500)
committerMatt Corallo <git@bluematt.me>
Thu, 13 Apr 2017 14:36:21 +0000 (13 10:36 -0400)
tree63e3bda7949b4168b47a219f5fae6bd2d636c32d
parentd89f8adf256727915346bd564e9c92bee094be36
Remove CValidationInterface::UpdatedTransaction

This removes another callback from block connection logic, making it
easier to reason about the wallet-RPCs-returns-stale-info issue.

UpdatedTransaction was previously used by the GUI to display
coinbase transactions only after they have a block built on top of
them. This worked fine for in most cases, but only worked due to a
corner case if the user received a coinbase payout in a block
immediately prior to restart. In that case, the normal process of
caching the most recent coinbase transaction's hash would not work,
and instead it would only work because of the on-load -checkblocks
calling DisconnectBlock and ConnectBlock on the current tip.

In order to make this more robust, a full mapWallet loop after the
first block which is connected after restart was added.
src/validation.cpp
src/validationinterface.cpp
src/validationinterface.h
src/wallet/wallet.cpp
src/wallet/wallet.h