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