chain: Add assertion in case of missing records in index db

This commit is contained in:
Wladimir J. van der Laan 2016-04-26 14:34:40 +02:00 committed by Jack Grigg
parent 77669b952b
commit 7b1acda395
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
1 changed files with 1 additions and 0 deletions

View File

@ -90,6 +90,7 @@ CBlockIndex* CBlockIndex::GetAncestor(int height)
pindexWalk = pindexWalk->pskip;
heightWalk = heightSkip;
} else {
assert(pindexWalk->pprev);
pindexWalk = pindexWalk->pprev;
heightWalk--;
}