Commit eaf65139 authored by Zhenzhen Zhan's avatar Zhenzhen Zhan

Fix an issue in FindFork that causes the program to exit during bitcore-node regtest.

parent fb030294
......@@ -78,6 +78,9 @@ CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const {
}
const CBlockIndex *CChain::FindFork(const CBlockIndex *pindex) const {
if (pindex == NULL) {
return NULL;
}
if (pindex->nHeight > Height())
pindex = pindex->GetAncestor(Height());
while (pindex && !Contains(pindex))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment