Skip to content

Commit cc592a8

Browse files
author
MarcoFalke
committed
Merge #20189: test: Switch to BIP341's suggested scheme for outputs without script
812baaa Switch to BIP341's suggested scheme for outputs without script (Pieter Wuille) Pull request description: BIP341 suggests using Hash<sub>TapTweak</sub>(pubkey) to derive the tweak in case of key-only outputs. The functional test framework currently uses Hash<sub>TapTweak</sub>(pubkey || 0x00...00) instead. Change this. There is no technical reason to prefer one over the other, but in case someone looks at it for inspiration, it's better to be consistent with the BIP. ACKs for top commit: laanwj: ACK 812baaa instagibbs: ACK bitcoin/bitcoin@812baaa Tree-SHA512: 02576c38776ec786255f49d7edecdb1ed8a9dcf0f547d58c23099588b4c3296edf279b103a6eb80e0f07d3c5ee9743f67d152f5244fd63adc6613b004f6969ed
2 parents 1be6f2d + 812baaa commit cc592a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/functional/test_framework/script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ def TaprootSignatureHash(txTo, spent_utxos, hash_type, input_index = 0, scriptpa
787787

788788
def taproot_tree_helper(scripts):
789789
if len(scripts) == 0:
790-
return ([], bytes(0 for _ in range(32)))
790+
return ([], bytes())
791791
if len(scripts) == 1:
792792
# One entry: treat as a leaf
793793
script = scripts[0]

0 commit comments

Comments
 (0)