aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCozz Lovan <cozzlovan@yahoo.com>2013-08-10 15:26:12 +0200
committerCozz Lovan <cozzlovan@yahoo.com>2013-08-10 15:27:25 +0200
commitc7fa1a358620a785af50c56cc02284990f63c608 (patch)
tree3e31bbf86f2e0acbd1fe8cfbc4c9328f50e70686 /src
parent6cc766fa55c0d74916d615c69689e9e798bf0aba (diff)
do not call BuildMerkleTree() unnecessarily twice
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 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;