Преглед изворни кода

net: remove whitelist_store_or_update call from OutboundSession

this should be redundant due to the GreylistRefinery task which is
responsible for filtering host lists. OutboundSession is just focused on
reading from the whitelist, not writing to it.
lunar-mining пре 2 година
родитељ
комит
a61a08c020
1 измењених фајлова са 1 додато и 9 уклоњено
  1. 1 9
      src/net/session/outbound_session.rs

+ 1 - 9
src/net/session/outbound_session.rs

@@ -31,7 +31,7 @@ use std::{
         atomic::{AtomicU32, Ordering},
         Arc, Weak,
     },
-    time::{Duration, Instant, UNIX_EPOCH},
+    time::{Duration, Instant},
 };
 
 use async_trait::async_trait;
@@ -266,14 +266,6 @@ impl Slot {
                 self.slot, addr_final
             );
 
-            // Update the last_seen field for this whitelisted peer.
-            // TODO: This peer should also be flagged as an "anchor" because we have been
-            // able to establish a connection to it to it.
-            let last_seen = UNIX_EPOCH.elapsed().unwrap().as_secs();
-
-            // TODO: FIXME: unwrap
-            hosts.whitelist_store_or_update(&addr_final, last_seen).await.unwrap();
-
             dnetev!(self, OutboundSlotConnected, {
                 slot: self.slot,
                 addr: addr_final.clone(),