From 909d6a4ba51748e66f5ef12713183ed2eb29d64e Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Mon, 18 Nov 2019 16:06:49 +0100 Subject: [PATCH] Simulate BlockConnected/BlockDisconnected for PS caches --- src/wallet/wallet.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index bafe6023cb..4d85f01bde 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -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