nit
This commit is contained in:
parent
3f2e471ef5
commit
ce1fc62789
@ -19,7 +19,7 @@ except ImportError:
|
||||
|
||||
from helpers import hash160, str_to_path
|
||||
from base58 import encode_base58_checksum, decode_base58_checksum
|
||||
from constants import H
|
||||
from constants import BIP_341_H
|
||||
|
||||
HARDENED = 2 ** 31
|
||||
|
||||
@ -793,7 +793,7 @@ class BIP32Node:
|
||||
def ranged_unspendable_internal_key(chain_code=32 * b"\x01", subderiv="/<0;1>/*"):
|
||||
# provide ranged provably unspendable key in serialized extended key format for core to understand it
|
||||
# core does NOT understand 'unspend('
|
||||
pk = b"\x02" + bytes.fromhex(H)
|
||||
pk = b"\x02" + bytes.fromhex(BIP_341_H)
|
||||
node = BIP32Node.from_chaincode_pubkey(chain_code, pk)
|
||||
return node.hwif() + subderiv
|
||||
|
||||
|
||||
@ -70,4 +70,4 @@ SIGHASH_MAP_NON_TAPROOT = {k:v for k, v in SIGHASH_MAP.items() if k != "DEFAULT"
|
||||
# (2**31) - 1 --> max unhardened, but we handle hardened via h elsewhere
|
||||
MAX_BIP32_IDX = 2147483647
|
||||
|
||||
H = "50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0" # BIP-0341
|
||||
BIP_341_H = "50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0"
|
||||
@ -9,7 +9,7 @@ from psbt import BasicPSBT
|
||||
from charcodes import KEY_QR, KEY_RIGHT, KEY_CANCEL, KEY_DELETE
|
||||
from bbqr import split_qrs
|
||||
from bip32 import BIP32Node, ranged_unspendable_internal_key
|
||||
from constants import H
|
||||
from constants import BIP_341_H
|
||||
from helpers import generate_binary_tree_template, str_to_path
|
||||
|
||||
|
||||
@ -2913,7 +2913,7 @@ def test_originless_keys(tmplt, offer_minsc_import, get_cc_key, bitcoin_core_sig
|
||||
|
||||
|
||||
@pytest.mark.parametrize("internal_key", [
|
||||
H,
|
||||
BIP_341_H,
|
||||
"r=@",
|
||||
"r=dfed64ff493dca2ab09eadefaa0c88be8404908fa6eff869ff71c0d359d086b9",
|
||||
"f19573a10866ee9881769e24464f9a0e989c2cb8e585db385934130462abed90"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user