diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-08-12 04:11:00 -0700 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-08-12 04:11:00 -0700 |
commit | ac1bd701bac699c52814dd8a13b0d0f86b0099ed (patch) | |
tree | 3e31bbf86f2e0acbd1fe8cfbc4c9328f50e70686 | |
parent | 6cc766fa55c0d74916d615c69689e9e798bf0aba (diff) | |
parent | c7fa1a358620a785af50c56cc02284990f63c608 (diff) |
Merge pull request #2890 from cozz/cozz1
do not call BuildMerkleTree() unnecessarily twice
-rw-r--r-- | src/main.cpp | 2 |
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; |