Parcourir la source

store: fix logic on is_empty_hostlist()

anchorlist, greylist AND whitelist must be empty for this to return
true (previously OR)
lunar-mining il y a 2 ans
Parent
commit
2696290aad
1 fichiers modifiés avec 4 ajouts et 5 suppressions
  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.
     /// Check if the hostlist is empty.
     pub async fn is_empty_hostlist(&self) -> bool {
     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
             return true
         } else {
         } else {
             return false
             return false