diff options
-rw-r--r-- | crates/tor-dirmgr/src/storage.rs | 1 | ||||
-rw-r--r-- | crates/tor-dirmgr/src/storage/sqlite.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/crates/tor-dirmgr/src/storage.rs b/crates/tor-dirmgr/src/storage.rs index 524a85ed9..e52cbcd4b 100644 --- a/crates/tor-dirmgr/src/storage.rs +++ b/crates/tor-dirmgr/src/storage.rs @@ -263,6 +263,7 @@ pub(crate) trait Store: Send + 'static { /// including its valid-after time and digest. fn latest_consensus_meta(&self, flavor: ConsensusFlavor) -> Result<Option<ConsensusMeta>>; /// Try to read the consensus corresponding to the provided metadata object. + #[cfg(test)] fn consensus_by_meta(&self, cmeta: &ConsensusMeta) -> Result<InputString>; /// Try to read the consensus whose SHA3-256 digests is the provided /// value, and its metadata. diff --git a/crates/tor-dirmgr/src/storage/sqlite.rs b/crates/tor-dirmgr/src/storage/sqlite.rs index 343be00a7..d9a38145a 100644 --- a/crates/tor-dirmgr/src/storage/sqlite.rs +++ b/crates/tor-dirmgr/src/storage/sqlite.rs @@ -381,6 +381,7 @@ impl Store for SqliteStore { Ok(None) } } + #[cfg(test)] fn consensus_by_meta(&self, cmeta: &ConsensusMeta) -> Result<InputString> { if let Some((text, _)) = self.consensus_by_sha3_digest_of_signed_part(cmeta.sha3_256_of_signed())? |