mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge cacbdbaa95 into merged_master (Bitcoin PR bitcoin/bitcoin#25132)
This commit is contained in:
commit
bcc0b07392
1 changed files with 4 additions and 0 deletions
|
|
@ -3063,6 +3063,10 @@ uint256 ComputeTapleafHash(uint8_t leaf_version, const CScript& script)
|
|||
|
||||
uint256 ComputeTaprootMerkleRoot(Span<const unsigned char> control, const uint256& tapleaf_hash)
|
||||
{
|
||||
assert(control.size() >= TAPROOT_CONTROL_BASE_SIZE);
|
||||
assert(control.size() <= TAPROOT_CONTROL_MAX_SIZE);
|
||||
assert((control.size() - TAPROOT_CONTROL_BASE_SIZE) % TAPROOT_CONTROL_NODE_SIZE == 0);
|
||||
|
||||
const int path_len = (control.size() - TAPROOT_CONTROL_BASE_SIZE) / TAPROOT_CONTROL_NODE_SIZE;
|
||||
uint256 k = tapleaf_hash;
|
||||
for (int i = 0; i < path_len; ++i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue