From 95e32d88b020567db36af667e969070c22e2ea32 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Mon, 17 Oct 2016 01:49:28 +0100 Subject: [PATCH] Add another assertion about the witness cache. Signed-off-by: Daira Hopwood --- src/wallet/wallet.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e857a23f8..7723c034f 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -691,6 +691,7 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, JSOutPoint jsoutpt {hash, i, j}; if (mapWallet[hash].mapNoteData.count(jsoutpt)) { CNoteData* nd = &(mapWallet[hash].mapNoteData[jsoutpt]); + assert(nd->witnesses.size() == 0); nd->witnesses.push_front(tree.witness()); // Check the validity of the cache assert(nWitnessCacheSize >= nd->witnesses.size());