aboutsummaryrefslogtreecommitdiff
path: root/src/primitives/block.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2015-11-17 17:35:44 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2015-11-27 15:36:52 +0100
commiteece63fa72566068cb2a1bf85c95a72a5ba59bc9 (patch)
tree093633b56700e77f3bc4d8fda2b3032d2aa7c4dd /src/primitives/block.h
parentee60e5625bf8a11c8e5509b9cea8b6465056c448 (diff)
Switch blocks to a constant-space Merkle root/branch algorithm.
This switches the Merkle tree logic for blocks to one that runs in constant (small) space. The old code is moved to tests, and a new test is added that for various combinations of block sizes, transaction positions to compute a branch for, and mutations: * Verifies that the old code and new code agree for the Merkle root. * Verifies that the old code and new code agree for the Merkle branch. * Verifies that the computed Merkle branch is valid. * Verifies that mutations don't change the Merkle root. * Verifies that mutations are correctly detected.
Diffstat (limited to 'src/primitives/block.h')
-rw-r--r--src/primitives/block.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/primitives/block.h b/src/primitives/block.h
index 54731ff557..5c017d436f 100644
--- a/src/primitives/block.h
+++ b/src/primitives/block.h
@@ -118,12 +118,6 @@ public:
return block;
}
- // Build the merkle tree for this block and return the merkle root.
- // If non-NULL, *mutated is set to whether mutation was detected in the merkle
- // tree (a duplication of transactions in the block leading to an identical
- // merkle root).
- uint256 ComputeMerkleRoot(bool* mutated = NULL) const;
-
std::string ToString() const;
};