From e40405a25776995feeeae7ea5f068bf7523e207b Mon Sep 17 00:00:00 2001 From: lunar-mining Date: Sun, 14 Jan 2024 09:54:44 +0100 Subject: [PATCH] store: bug fix fix accidental read from wrong hostlist --- src/net/hosts/store.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/hosts/store.rs b/src/net/hosts/store.rs index 9301d5ec7..306a4d812 100644 --- a/src/net/hosts/store.rs +++ b/src/net/hosts/store.rs @@ -342,7 +342,7 @@ impl Hosts { self.anchorlist_store(addr.clone(), last_seen.clone()).await; } debug!(target: "store::anchorlist_store_or_update()", - "We have this entry in the anchorlist. Updating last seen..."); + "We have this entry in the anchorlist. Updating last seen..."); let index = self .get_anchorlist_index_at_addr(addr.clone()) @@ -744,7 +744,7 @@ impl Hosts { /// Get the index for a given addr on the anchorlist. pub async fn get_anchorlist_index_at_addr(&self, addr: Url) -> Option { - self.whitelist.read().await.iter().position(|a| a.0 == addr) + self.anchorlist.read().await.iter().position(|a| a.0 == addr) } /// Get the entry for a given addr on the whitelist.