From b5672cb2c79257cd1ac20de3474ba825cae198b5 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 16 Dec 2021 08:51:34 -0500 Subject: [PATCH] tor-dirmgr: Warn on a bug case. This warning occurs if we ask for microdescriptors from our local cache, and our cache gives us something we didn't ask for. It shouldn't be possible, so let's warn when it occurs. This patch resolves an XXXX. --- crates/tor-dirmgr/src/state.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/tor-dirmgr/src/state.rs b/crates/tor-dirmgr/src/state.rs index 615ddb7cb..88359da96 100644 --- a/crates/tor-dirmgr/src/state.rs +++ b/crates/tor-dirmgr/src/state.rs @@ -611,8 +611,7 @@ impl DirState for GetMicrodescsState { for (id, text) in docs { if let DocId::Microdesc(digest) = id { if !self.missing.remove(&digest) { - // XXXX BUG: - // we didn't want this. + warn!("Bug: loaded a microdesc that we didn't want from the cache."); continue; } if let Ok(md) = Microdesc::parse(text.as_str()?) {