Sfoglia il codice sorgente

dnet+lilith: rename anchorlist to goldlist

draoi 2 anni fa
parent
commit
68b63a76e9
3 ha cambiato i file con 12 aggiunte e 12 eliminazioni
  1. 2 2
      bin/dnet/src/model.py
  2. 8 8
      bin/dnet/src/view.py
  3. 2 2
      bin/lilith/src/main.rs

+ 2 - 2
bin/dnet/src/model.py

@@ -167,13 +167,13 @@ class Model:
             urls = spawn['urls']
             whitelist = spawn['whitelist']
             greylist = spawn['greylist']
-            anchorlist = spawn['anchorlist']
+            goldlist = spawn['goldlist']
 
             spawn = self.liliths[key]['spawns'][name] = {}
             spawn['urls'] = urls
             spawn['whitelist'] = whitelist
             spawn['greylist'] = greylist
-            spawn['anchorlist'] = anchorlist
+            spawn['goldlist'] = goldlist
 
         #logging.debug(f'added lilith {self.liliths}')
 

+ 8 - 8
bin/dnet/src/view.py

@@ -234,12 +234,12 @@ class View():
                         f"  {host}"),
                         self.pile.options()))
 
-            if info['anchorlist']:
-                anchorlist = info['anchorlist']
+            if info['goldlist']:
+                goldlist = info['goldlist']
                 self.pile.contents.append((urwid.Text(
-                    f"Anchorlist:"),
+                    f"Goldlist:"),
                     self.pile.options()))
-                for host in anchorlist:
+                for host in goldlist:
                     self.pile.contents.append((urwid.Text(
                         f"  {host}"),
                         self.pile.options()))
@@ -317,12 +317,12 @@ class View():
                         f"  {host}"),
                         self.pile.options()))
 
-            if info['anchorlist']:
-                anchorlist = info['anchorlist']
+            if info['goldlist']:
+                goldlist = info['goldlist']
                 self.pile.contents.append((urwid.Text(
-                    f"Anchorlist:"),
+                    f"Goldlist:"),
                     self.pile.options()))
-                for host in anchorlist:
+                for host in goldlist:
                     self.pile.contents.append((urwid.Text(
                         f"  {host}"),
                         self.pile.options()))

+ 2 - 2
bin/lilith/src/main.rs

@@ -106,7 +106,7 @@ impl Spawn {
             .collect()
     }
 
-    async fn get_anchorlist(&self) -> Vec<JsonValue> {
+    async fn get_goldlist(&self) -> Vec<JsonValue> {
         self.p2p
             .hosts()
             .container
@@ -127,7 +127,7 @@ impl Spawn {
             ("urls".to_string(), JsonValue::Array(addr_vec)),
             ("whitelist".to_string(), JsonValue::Array(self.get_whitelist().await)),
             ("greylist".to_string(), JsonValue::Array(self.get_greylist().await)),
-            ("anchorlist".to_string(), JsonValue::Array(self.get_anchorlist().await)),
+            ("goldlist".to_string(), JsonValue::Array(self.get_goldlist().await)),
         ]))
     }
 }