Skip to content

Commit 47c480b

Browse files
committed
check_scriptpubkey_template_and_dust: support anysegwit. fix #8012
1 parent 3448847 commit 47c480b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

electrum/transaction.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,8 @@ def check_scriptpubkey_template_and_dust(scriptpubkey, amount: Optional[int]):
476476
dust_limit = bitcoin.DUST_LIMIT_P2WSH
477477
elif match_script_against_template(scriptpubkey, SCRIPTPUBKEY_TEMPLATE_P2WPKH):
478478
dust_limit = bitcoin.DUST_LIMIT_P2WPKH
479+
elif match_script_against_template(scriptpubkey, SCRIPTPUBKEY_TEMPLATE_ANYSEGWIT):
480+
dust_limit = bitcoin.DUST_LIMIT_UNKNOWN_SEGWIT
479481
else:
480482
raise Exception(f'scriptpubkey does not conform to any template: {scriptpubkey.hex()}')
481483
if amount < dust_limit:

0 commit comments

Comments
 (0)