aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-11-22 13:33:03 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2012-11-22 13:33:03 -0800
commitc07a1a6ee4d39ba04083cd7cb83fc31e91a096d5 (patch)
treee8df83017f1e7778c96d179f6818652ee3476e94 /src
parentb0e228a4b03dbf4b5ab3b21b8712e8bf8706e4d8 (diff)
parentcd6dc96c4fb24f3c40e989442a6503403a944e78 (diff)
downloadbitcoin-c07a1a6ee4d39ba04083cd7cb83fc31e91a096d5.tar.xz
Merge pull request #1980 from sipa/noreorgsame
Do not reorganize if new branch has same amount of work
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 808c213d63..e2e993a138 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1198,7 +1198,7 @@ bool ConnectBestBlock() {
pindexNewBest = *it;
}
- if (pindexNewBest == pindexBest)
+ if (pindexNewBest == pindexBest || (pindexBest && pindexNewBest->bnChainWork == pindexBest->bnChainWork))
return true; // nothing to do
// check ancestry