]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 20 May 2023 14:30:40 +0000 (16:30 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 20 May 2023 14:30:40 +0000 (16:30 +0200)
- it is more the originator ...

blocks_empty.db
fba.py
fetch_instances.py

index 14ad7e8cb364df4f54a3ac78d54ca1805389dbfb..457b338488c069c6b7d032bd44fbf7f8a64f55ff 100644 (file)
Binary files a/blocks_empty.db and b/blocks_empty.db differ
diff --git a/fba.py b/fba.py
index 8c708e9f510f9466ab292b429bc98a4e4f214f83..4468b804e793910571172aaac1f2293ef55c61a3 100644 (file)
--- a/fba.py
+++ b/fba.py
@@ -233,22 +233,22 @@ def block_instance(blocker: str, blocked: str, reason: str, block_level: str, fi
         print("ERROR: failed SQL query:", blocker, blocked, reason, block_level, first_added, last_seen)
         sys.exit(255)
 
-def add_instance(domain: str, origin: str):
-    # NOISY-DEBUG: print("DEBUG: domain,origin:", domain, origin)
+def add_instance(domain: str, originator: str):
+    # NOISY-DEBUG: print("DEBUG: domain,originator:", domain, originator)
     if domain.find("@") > 0:
         print("WARNING: Bad domain name:", domain)
         raise
-    elif origin is not None and origin.find("@") > 0:
-        print("WARNING: Bad origin name:", origin)
+    elif originator is not None and originator.find("@") > 0:
+        print("WARNING: Bad originator name:", originator)
         raise
 
-    print("--- Adding new instance:", domain, origin)
+    print("--- Adding new instance:", domain, originator)
     try:
         c.execute(
-            "INSERT INTO instances (domain,origin,hash,software) VALUES (?, ?, ?, ?)",
+            "INSERT INTO instances (domain,originator,hash,software) VALUES (?, ?, ?, ?)",
             (
                domain,
-               origin,
+               originator,
                get_hash(domain),
                determine_software(domain)
             ),
index 9237fc1566aa6cec63c70db8de0449b7a4698be5..e4a9f5a28d18bf319ee97066e0f8b2a1371cf6a6 100644 (file)
@@ -4,8 +4,8 @@ import json
 import time
 import fba
 
-def fetch_instances(domain: str, origin: str):
-    # NOISY-DEBUG: print("DEBUG: Fetching instances for domain:", domain, origin)
+def fetch_instances(domain: str, originator: str):
+    # NOISY-DEBUG: print("DEBUG: Fetching instances for domain:", domain, originator)
     peerlist = fba.get_peers(domain)
 
     if (peerlist is None):
@@ -16,8 +16,8 @@ def fetch_instances(domain: str, origin: str):
         )
 
         if fba.c.fetchone() == None:
-            # NOISY-DEBUG: print("DEBUG: Adding new domain:", domain, origin)
-            fba.add_instance(domain, origin)
+            # NOISY-DEBUG: print("DEBUG: Adding new domain:", domain, originator)
+            fba.add_instance(domain, originator)
 
         fba.conn.commit()
         return