From dc569a6b639727fb19e657f47f260cc00e217c16 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 23 May 2023 09:10:42 +0200 Subject: [PATCH] Continued: - added get_peers_url column - flush any pending data after get_peers() was invoked - blacklisted already added instances should be removed (WIP) --- blocks_empty.db | Bin 28672 -> 28672 bytes fetch_instances.py | 5 ++++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/blocks_empty.db b/blocks_empty.db index dea0936df1a595e52b68e81b1a68d3ecb118e8f1..bd2bd6ac7a71ea1ec1e2a80336d912ff268be7f6 100644 GIT binary patch delta 98 zcmZp8z}WDBae}nqM+OE4b|7X0Vn!g=o~UCi`H?}-dm=Bt4g)LqY6iY$-gn%q`RDSx za&Fu#C}7FCc_Zg9My?hIUUqSLdBzU^&5yacn7DNm(o;*~3sO^yiZ`F)HA?~jk%k%_ delta 89 zcmZp8z}WDBae}nq2L=WPb|7X0Vn!g=ny6ze`GG;tdm=Bt4g)LqO$NSZ-gn$L`RDSx qa&Fu#C}7FCc_Zg9#)%X3xLSmG*~R7M8QY6DZ{_A<+WeMRI0*pL5*K#> diff --git a/fetch_instances.py b/fetch_instances.py index 41d1d77..9aab60c 100644 --- a/fetch_instances.py +++ b/fetch_instances.py @@ -20,6 +20,9 @@ def fetch_instances(domain: str, origin: str): if (peerlist is None): print("ERROR: Cannot fetch peers:", domain) return + elif domain in fba.nodeinfos["get_peers_url"]: + # NOISY-DEBUG: print(f"DEBUG: domain='{domain}' has pending nodeinfo data, flushing ...") + fba.update_nodeinfos(domain) print(f"INFO: Checking {len(peerlist)} instances from {domain} ...") for instance in peerlist: @@ -63,7 +66,7 @@ for row in fba.cursor.fetchall(): domain = row[0] # NOISY-DEBUG: print("DEBUG: domain:", domain) if fba.is_blacklisted(domain): - # NOISY-DEBUG: print("DEBUG: domain is blacklisted:", domain) + print("WARNING: domain is blacklisted:", domain) continue print("INFO: Fetching instances for instance:", domain) -- 2.39.5