From 4c9f20aa7f651d42c8351dd9549578ac28ece797 Mon Sep 17 00:00:00 2001 From: nolash Date: Fri, 8 Oct 2021 11:26:09 +0200 Subject: [PATCH] Add explicit zero length tx lsit check for cic-cache verify --- apps/data-seeding/verify.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/data-seeding/verify.py b/apps/data-seeding/verify.py index ad3923cb..338a296d 100644 --- a/apps/data-seeding/verify.py +++ b/apps/data-seeding/verify.py @@ -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))