mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
FULLFEATURE: Separate serialization tx witness and the rest
This commit is contained in:
parent
a04ea8a812
commit
663e9bd329
10 changed files with 164 additions and 51 deletions
|
|
@ -65,8 +65,12 @@ uint256 CBlock::BuildMerkleTree(bool* fMutated) const
|
|||
*/
|
||||
vMerkleTree.clear();
|
||||
vMerkleTree.reserve(vtx.size() * 2 + 16); // Safe upper bound for the number of total nodes.
|
||||
for (std::vector<CTransaction>::const_iterator it(vtx.begin()); it != vtx.end(); ++it)
|
||||
vMerkleTree.push_back(it->GetHash());
|
||||
for (std::vector<CTransaction>::const_iterator it(vtx.begin()); it != vtx.end(); ++it) {
|
||||
if (IsBitcoinBlock())
|
||||
vMerkleTree.push_back(it->GetBitcoinHash());
|
||||
else
|
||||
vMerkleTree.push_back(it->GetFullHash());
|
||||
}
|
||||
int j = 0;
|
||||
bool mutated = false;
|
||||
for (int nSize = vtx.size(); nSize > 1; nSize = (nSize + 1) / 2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue