Browse Source

Add another assertion about the witness cache.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
pull/4/head
Daira Hopwood 8 years ago
parent
commit
95e32d88b0
  1. 1
      src/wallet/wallet.cpp

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

Loading…
Cancel
Save