Block.buildMerkleTree - multiple declarations
Function Block.buildMerkleTree
Build a merkle tree and its root, and store the tree to this Block
geod24 .bitblob .BitBlob!(64L) buildMerkleTree() nothrow @safe;
Returns
the merkle root
Example
assert(getPow2Aligned(1) == 1);
assert(getPow2Aligned(2) == 2);
assert(getPow2Aligned(3) == 4);
assert(getPow2Aligned(4) == 4);
assert(getPow2Aligned(5) == 8);
assert(getPow2Aligned(7) == 8);
assert(getPow2Aligned(8) == 8);
assert(getPow2Aligned(9) == 16);
assert(getPow2Aligned(15) == 16);
assert(getPow2Aligned(16) == 16);
assert(getPow2Aligned(17) == 32);
Function Block.buildMerkleTree
Build a merkle tree and return its root
static geod24 .bitblob .BitBlob!(64L) buildMerkleTree
(
in const(Transaction[]) txs,
ref geod24 .bitblob .BitBlob!(64L)[] merkle_tree
) nothrow @safe;
Parameters
Name | Description |
---|---|
txs | the transactions to use |
merkle_tree | will contain the merkle tree on function return |
Returns
the merkle root