aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2014-12-31 03:28:05 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2014-12-31 03:28:05 +0000
commit1b178a7f966cd3649b7f0a52ffc4b8ef4c227900 (patch)
treea67b956df5df61ce7cf51fe58020371b7485047a /src/main.cpp
parent228d2385254ee136ef64d229a414fdd7cefea9a0 (diff)
Bugfix: ConnectBlock: In case the genesis block gets in with fJustCheck, behave correctly
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 70e3973e6c..7c5b7401ed 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1616,7 +1616,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
// Special case for the genesis block, skipping connection of its transactions
// (its coinbase is unspendable)
if (block.GetHash() == Params().HashGenesisBlock()) {
- view.SetBestBlock(pindex->GetBlockHash());
+ if (!fJustCheck)
+ view.SetBestBlock(pindex->GetBlockHash());
return true;
}