From 188b9c0f8661308ae7ab01d4ead19d1ca45e98ed Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 3 Nov 2022 11:40:57 -0400 Subject: [PATCH] GuardMgr: Remove duplicate code in set_filter --- crates/tor-guardmgr/src/lib.rs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/crates/tor-guardmgr/src/lib.rs b/crates/tor-guardmgr/src/lib.rs index 525c01434..05cbd648d 100644 --- a/crates/tor-guardmgr/src/lib.rs +++ b/crates/tor-guardmgr/src/lib.rs @@ -882,19 +882,8 @@ impl GuardMgrInner { /// Replace the current GuardFilter with `filter`. fn set_filter(&mut self, filter: GuardFilter, now: SystemTime) { - self.with_opt_netdir(|this, netdir| { - this.filter = filter; - // This call will invoke update_chosen_guard_set() if possible, and - // then call set_filter on the GuardSet. - this.update_active_set_and_filter(netdir); - Self::update_guardset_internal( - &this.params, - now, - this.guards.active_guards_mut(), - netdir, - ); - // XXXX need real universe - }); + self.filter = filter; + self.update(now); } /// Called when the circuit manager reports (via [`GuardMonitor`]) that