Skip to content

Commit

Permalink
Merge #1476: ignore all txs with nonstandard sPKs when scanning
Browse files Browse the repository at this point in the history
abbffef ignore matched txs with invalid sPKs when scanning (openoms)

Pull request description:

  Fixes the second edge case in #1471

  completes #1473

ACKs for top commit:
  AdamISZ:
    tACK abbffef
  kristapsk:
    utACK abbffef

Tree-SHA512: 2789a1e604820726fc3261b9611e42ac19968f1ba8272512a715ace885672bca7692cc5ccfd59aa1469961660f2f410f437b406ce2dec319f52505750d9b7d7b
  • Loading branch information
AdamISZ committed Apr 19, 2023
2 parents df17708 + abbffef commit f0913f0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions jmbitcoin/jmbitcoin/snicker.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,11 @@ def is_snicker_v1_tx(tx):
except CCoinAddressError:
return False
else:
if not btc.CCoinAddress.from_scriptPubKey(
vo.scriptPubKey).get_scriptPubKey_type() == matched_spk:
try:
if not btc.CCoinAddress.from_scriptPubKey(
vo.scriptPubKey).get_scriptPubKey_type() == matched_spk:
return False
except CCoinAddressError:
return False
assert matched_spk
return True

0 comments on commit f0913f0

Please sign in to comment.