Browse Source

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

0.13
Wladimir J. van der Laan 9 years ago
parent
commit
84c13e759d
  1. 1
      src/chain.cpp

1
src/chain.cpp

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

Loading…
Cancel
Save