Add another assertion about the witness cache.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2016-10-17 01:49:28 +01:00
parent 8e41408aa7
commit 95e32d88b0
1 changed files with 1 additions and 0 deletions

View File

@ -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());