Просмотр исходного кода

store: fix logic on is_empty_hostlist()

anchorlist, greylist AND whitelist must be empty for this to return
true (previously OR)
lunar-mining 2 лет назад
Родитель
Сommit
2696290aad
1 измененных файлов с 4 добавлено и 5 удалено
  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