aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-08-12 04:11:00 -0700
committerGavin Andresen <gavinandresen@gmail.com>2013-08-12 04:11:00 -0700
commitac1bd701bac699c52814dd8a13b0d0f86b0099ed (patch)
tree3e31bbf86f2e0acbd1fe8cfbc4c9328f50e70686
parent6cc766fa55c0d74916d615c69689e9e798bf0aba (diff)
parentc7fa1a358620a785af50c56cc02284990f63c608 (diff)
Merge pull request #2890 from cozz/cozz1
do not call BuildMerkleTree() unnecessarily twice
-rw-r--r--src/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 9de895374e..063536820d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2264,7 +2264,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
return state.DoS(100, error("CheckBlock() : out-of-bounds SigOpCount"));
// Check merkle root
- if (fCheckMerkleRoot && block.hashMerkleRoot != block.BuildMerkleTree())
+ if (fCheckMerkleRoot && block.hashMerkleRoot != block.vMerkleTree.back())
return state.DoS(100, error("CheckBlock() : hashMerkleRoot mismatch"));
return true;