1
0
mirror of https://github.com/bitcoin/bips.git synced 2026-07-27 18:13:38 +00:00

bip360: minor syntax fix on tapbranch_hash()

This commit is contained in:
notmike
2026-06-26 20:08:22 -06:00
parent 8ea1eaac2d
commit 64d068e9d1

View File

@@ -85,7 +85,7 @@ def tapleaf_hash(script: str, tapleaf_ver: str = "c0") -> str:
def tapbranch_hash(left: str, right: str) -> bytes: def tapbranch_hash(left: str, right: str) -> bytes:
"""Hash function for tree branches""" """Hash function for tree branches"""
return tagged_hash("TapBranch", b"".join(sorted((h2b(right) + h2b(left))))) return tagged_hash("TapBranch", b"".join(sorted((h2b(left), h2b(right)))))
def compute_merkle_root(tree: ScriptTree) -> str: def compute_merkle_root(tree: ScriptTree) -> str: