Explorar el Código

store: fix logic on is_empty_hostlist()

anchorlist, greylist AND whitelist must be empty for this to return
true (previously OR)
lunar-mining hace 2 años
padre
commit
2696290aad
Se han modificado 1 ficheros con 4 adiciones y 5 borrados
  1. 4 5
      src/net/hosts/store.rs

+ 4 - 5
src/net/hosts/store.rs

@@ -689,11 +689,10 @@ impl Hosts {
 
     /// Check if the hostlist is empty.
     pub async fn is_empty_hostlist(&self) -> bool {
-        if self.is_empty_greylist().await {
-            return true
-        } else if self.is_empty_whitelist().await {
-            return true
-        } else if self.is_empty_anchorlist().await {
+        if self.is_empty_greylist().await &&
+            self.is_empty_whitelist().await &&
+            self.is_empty_anchorlist().await
+        {
             return true
         } else {
             return false