Add another assertion about the witness cache.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
@@ -691,6 +691,7 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex,
|
|||||||
JSOutPoint jsoutpt {hash, i, j};
|
JSOutPoint jsoutpt {hash, i, j};
|
||||||
if (mapWallet[hash].mapNoteData.count(jsoutpt)) {
|
if (mapWallet[hash].mapNoteData.count(jsoutpt)) {
|
||||||
CNoteData* nd = &(mapWallet[hash].mapNoteData[jsoutpt]);
|
CNoteData* nd = &(mapWallet[hash].mapNoteData[jsoutpt]);
|
||||||
|
assert(nd->witnesses.size() == 0);
|
||||||
nd->witnesses.push_front(tree.witness());
|
nd->witnesses.push_front(tree.witness());
|
||||||
// Check the validity of the cache
|
// Check the validity of the cache
|
||||||
assert(nWitnessCacheSize >= nd->witnesses.size());
|
assert(nWitnessCacheSize >= nd->witnesses.size());
|
||||||
|
|||||||
Reference in New Issue
Block a user