Support bech32 and bech32m (taproot) addresses in the query command
Coin.BECH32_HRP (plm, tplm, rplm) and a BIP173/BIP350 segwit decoder let address_to_hashX read segwit addresses. The witness transaction fixtures are no longer skipped. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2ef6a7abcb
commit
b7ce0efad1
6 files changed
+170
-10
No files matched your search
@@ -61,7 +61,5 @@ def test_transaction(transaction_details):
|
||||
spk = vout[i]['scriptPubKey']
|
||||
tx_pks = tx.outputs[i].pk_script
|
||||
assert spk['hex'] == tx_pks.hex()
|
||||
if spk['type'].startswith("witness_"):
|
||||
continue # bech32 addresses are not supported by Coin.address_to_hashX
|
||||
address, = spk["addresses"]
|
||||
assert coin.address_to_hashX(address) == coin.hashX_from_script(tx_pks)
|
||||
Reference in new issue
Block a user