From 2c315965d7ddd486d76d726e02deeb3356e6bb2d Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 26 Jun 2021 13:54:57 -0400 Subject: [PATCH] Log data about clearing witness cache --- src/wallet/wallet.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index f6d2d7f57..3bc3b99cd 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -908,12 +908,15 @@ int64_t CWallet::NullifierCount() void CWallet::ClearNoteWitnessCache() { LOCK(cs_wallet); + int notes = 0; for (std::pair& wtxItem : mapWallet) { for (mapSaplingNoteData_t::value_type& item : wtxItem.second.mapSaplingNoteData) { item.second.witnesses.clear(); item.second.witnessHeight = -1; + notes++; } } + LogPrintf("%s: Cleared witness data from %d wallet items and %d SaplingNotes\n", __func__, mapWallet.size(), notes); } void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex)