]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Tue, 23 May 2023 07:10:42 +0000 (09:10 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 23 May 2023 07:12:00 +0000 (09:12 +0200)
- 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
fetch_instances.py

index dea0936df1a595e52b68e81b1a68d3ecb118e8f1..bd2bd6ac7a71ea1ec1e2a80336d912ff268be7f6 100644 (file)
Binary files a/blocks_empty.db and b/blocks_empty.db differ
index 41d1d770547a57c6a867d8297ecce76bd3d9b349..9aab60c1a15dedcf9e9a5b633c968a2c58197e53 100644 (file)
@@ -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)