Browse Source

Merge Joinmarket-Org/joinmarket-clientserver#1476: ignore all txs with nonstandard sPKs when scanning

abbffefda0 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 abbffefda0
  kristapsk:
    utACK abbffefda0

Tree-SHA512: 2789a1e604820726fc3261b9611e42ac19968f1ba8272512a715ace885672bca7692cc5ccfd59aa1469961660f2f410f437b406ce2dec319f52505750d9b7d7b
master
Adam Gibson 3 years ago
parent
commit
f0913f0476
No known key found for this signature in database
GPG Key ID: 141001A1AF77F20B
  1. 7
      jmbitcoin/jmbitcoin/snicker.py

7
jmbitcoin/jmbitcoin/snicker.py

@ -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

Loading…
Cancel
Save