0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-09 10:43:19 -05:00

Do not reorganize if new branch has same amount of work

This commit is contained in:
Pieter Wuille 2012-11-04 13:38:51 +01:00
parent 86406daeca
commit cd6dc96c4f

View file

@ -1196,7 +1196,7 @@ bool ConnectBestBlock() {
pindexNewBest = *it;
}
if (pindexNewBest == pindexBest)
if (pindexNewBest == pindexBest || (pindexBest && pindexNewBest->bnChainWork == pindexBest->bnChainWork))
return true; // nothing to do
// check ancestry