nulldata can be None if it isn't parseable

This commit is contained in:
Jude Nelson
2018-01-17 00:30:53 -05:00
parent 544f265cf0
commit 4c6562b5c8

View File

@@ -1586,6 +1586,9 @@ def blockstack_tx_filter( tx ):
"""
if not 'nulldata' in tx:
return False
if tx['nulldata'] is None:
return False
payload = binascii.unhexlify( tx['nulldata'] )
if payload.startswith("id"):
@@ -1997,6 +2000,7 @@ def load_expected_snapshots( snapshots_path ):
Return the snapshots as a dict on success
Return None on error
"""
# TODO: compat with new snapshots db
# use snapshots?
snapshots_path = os.path.expanduser(snapshots_path)
expected_snapshots = {}