diff options
| author | Pieter Wuille <[email protected]> | 2014-10-02 06:05:02 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2014-10-02 06:10:19 +0200 |
| commit | 76c171033ccca628d3e563d898b38d74f3e51f5c (patch) | |
| tree | 10d2b0c4bf4cacdfadd13cbd46e1112c75ed78d2 /src/core.h | |
| parent | Merge pull request #4980 (diff) | |
| parent | Do merkle root and txid duplicates check simultaneously (diff) | |
| download | discoin-76c171033ccca628d3e563d898b38d74f3e51f5c.tar.xz discoin-76c171033ccca628d3e563d898b38d74f3e51f5c.zip | |
Merge pull request #4926
584a358 Do merkle root and txid duplicates check simultaneously (Pieter Wuille)
Diffstat (limited to 'src/core.h')
| -rw-r--r-- | src/core.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core.h b/src/core.h index e8435c8b0..a34829357 100644 --- a/src/core.h +++ b/src/core.h @@ -529,7 +529,11 @@ public: return block; } - uint256 BuildMerkleTree() const; + // Build the in-memory 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 BuildMerkleTree(bool* mutated = NULL) const; std::vector<uint256> GetMerkleBranch(int nIndex) const; static uint256 CheckMerkleBranch(uint256 hash, const std::vector<uint256>& vMerkleBranch, int nIndex); |