Simulate BlockConnected/BlockDisconnected for PS caches

This commit is contained in:
Alexander Block 2019-11-18 16:06:49 +01:00
parent db7f471c7d
commit 909d6a4ba5

View File

@ -1313,6 +1313,12 @@ void CWallet::SyncTransaction(const CTransaction& tx, const CBlockIndex *pindex,
{
LOCK2(cs_main, cs_wallet);
// v0.14.0.x: Simulates the behavior found in the develop branch when ::BlockConnected/BlockDisconnected are called
if (pindex != nullptr && (posInBlock == 0 || posInBlock == CMainSignals::SYNC_TRANSACTION_NOT_IN_BLOCK)) {
fAnonymizableTallyCached = false;
fAnonymizableTallyCachedNonDenom = false;
}
if (!AddToWalletIfInvolvingMe(tx, pindex, posInBlock, true))
return; // Not one of ours