From 8a7d37befda5fb06a4acddbadf6ec1d68fdad67c Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Sun, 16 Oct 2016 15:29:20 +0100 Subject: [PATCH] Move the increment of nWitnessCacheSize to make the later assertions correct. Signed-off-by: Daira Hopwood --- src/wallet/wallet.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 8c41c5313..35e99328f 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -654,6 +654,9 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, } } } + if (nWitnessCacheSize < WITNESS_CACHE_SIZE) { + nWitnessCacheSize += 1; + } const CBlock* pblock {pblockIn}; CBlock block; @@ -694,9 +697,6 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, } } } - if (nWitnessCacheSize < WITNESS_CACHE_SIZE) { - nWitnessCacheSize += 1; - } for (std::pair& wtxItem : mapWallet) { for (mapNoteData_t::value_type& item : wtxItem.second.mapNoteData) { CNoteData* nd = &(item.second);