mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-19 14:45:08 +01:00
Merge #20189: test: Switch to BIP341's suggested scheme for outputs without script
812baaa1f8
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: ACK812baaa1f8
instagibbs: ACK812baaa1f8
Tree-SHA512: 02576c38776ec786255f49d7edecdb1ed8a9dcf0f547d58c23099588b4c3296edf279b103a6eb80e0f07d3c5ee9743f67d152f5244fd63adc6613b004f6969ed
This commit is contained in:
commit
cc592a85ea
@ -787,7 +787,7 @@ def TaprootSignatureHash(txTo, spent_utxos, hash_type, input_index = 0, scriptpa
|
||||
|
||||
def taproot_tree_helper(scripts):
|
||||
if len(scripts) == 0:
|
||||
return ([], bytes(0 for _ in range(32)))
|
||||
return ([], bytes())
|
||||
if len(scripts) == 1:
|
||||
# One entry: treat as a leaf
|
||||
script = scripts[0]
|
||||
|
Loading…
Reference in New Issue
Block a user