diff options
author | kallewoof <karljohan-alm@garage.co.jp> | 2023-01-05 08:43:37 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-05 08:43:37 +0900 |
commit | 00902d17d9a66b164bf5f8bd9e33e0131476407a (patch) | |
tree | e4e74837b754cbc85f73f705bb1917308481e4f0 | |
parent | 79bb53dde55e94ebf51ada4adee38fb40f127ae6 (diff) | |
parent | 3d243d8a49cefd16d628b85cc3ef0f54bd71f107 (diff) | |
download | bips-00902d17d9a66b164bf5f8bd9e33e0131476407a.tar.xz |
Merge pull request #1350 from jonasnick/bip-0341-signingfix
BIP 341: allow taproot_sign_key with no script tree
-rw-r--r-- | bip-0341.mediawiki | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bip-0341.mediawiki b/bip-0341.mediawiki index 9bc8723..8d2af3c 100644 --- a/bip-0341.mediawiki +++ b/bip-0341.mediawiki @@ -249,7 +249,10 @@ TapTweak = tagged_hash("TapTweak", p + ABCDE) <source lang="python"> def taproot_sign_key(script_tree, internal_seckey, hash_type, bip340_aux_rand): - _, h = taproot_tree_helper(script_tree) + if script_tree is None: + h = bytes() + else: + _, h = taproot_tree_helper(script_tree) output_seckey = taproot_tweak_seckey(internal_seckey, h) sig = schnorr_sign(sighash(hash_type), output_seckey, bip340_aux_rand) if hash_type != 0: |