aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2015-11-28 22:24:10 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2015-11-28 22:27:38 +0100
commit61457c29d735b77182b5fbd45e86d7e3db343857 (patch)
tree12ef26e009f3bab19c7b4d9f8e643db2ccd8a5f0 /src/main.cpp
parent8d26289c9a7c77c7e5cecaafebe0231cb4d69fbe (diff)
parenteece63fa72566068cb2a1bf85c95a72a5ba59bc9 (diff)
downloadbitcoin-61457c29d735b77182b5fbd45e86d7e3db343857.tar.xz
Merge pull request #6508
eece63f Switch blocks to a constant-space Merkle root/branch algorithm. (Pieter Wuille) ee60e56 Add merkle.{h,cpp}, generic merkle root/branch algorithm (Pieter Wuille)
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 6b6840ce8c..1003dd8c36 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -12,6 +12,7 @@
#include "checkpoints.h"
#include "checkqueue.h"
#include "consensus/consensus.h"
+#include "consensus/merkle.h"
#include "consensus/validation.h"
#include "hash.h"
#include "init.h"
@@ -2876,7 +2877,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
// Check the merkle root.
if (fCheckMerkleRoot) {
bool mutated;
- uint256 hashMerkleRoot2 = block.ComputeMerkleRoot(&mutated);
+ uint256 hashMerkleRoot2 = BlockMerkleRoot(block, &mutated);
if (block.hashMerkleRoot != hashMerkleRoot2)
return state.DoS(100, error("CheckBlock(): hashMerkleRoot mismatch"),
REJECT_INVALID, "bad-txnmrklroot", true);