Add explicit zero length tx lsit check for cic-cache verify

This commit is contained in:
nolash 2021-10-08 11:26:09 +02:00
parent 980191be4f
commit 4c9f20aa7f
Signed by untrusted user who does not match committer: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -366,9 +366,11 @@ class Verifier:
except urllib.error.HTTPError as e:
raise VerifierError(
'({}) {}'.format(url, e),
'cache',
'cache (tx user)',
)
r = json.load(res)
if len(r['data']) == 0:
raise VerifierError('empty tx list for address {}'.format(address), 'cache (tx user)')
for tx in r['data']:
logg.warning('found tx {} for {} but not checking validity'.format(tx['tx_hash'], address))