Do not reorganize if new branch has same amount of work

This commit is contained in:
Pieter Wuille
2012-11-05 21:24:11 +01:00
parent 86406daeca
commit cd6dc96c4f
+1 -1
View File
@@ -1196,7 +1196,7 @@ bool ConnectBestBlock() {
pindexNewBest = *it; pindexNewBest = *it;
} }
if (pindexNewBest == pindexBest) if (pindexNewBest == pindexBest || (pindexBest && pindexNewBest->bnChainWork == pindexBest->bnChainWork))
return true; // nothing to do return true; // nothing to do
// check ancestry // check ancestry