tor-netdir: Rename hs_time_period

Change its name to hs_* like we do with things at this layer.

But, it turns out, that at least for hs client connections to fetch
the descriptor, I don't seem to need to call it yet ?  Maybe it's not
needed.
This commit is contained in:
Ian Jackson 2023-03-27 17:01:52 +01:00
parent db028a6d34
commit 4cf3cd00ef
1 changed files with 5 additions and 3 deletions

View File

@ -1234,13 +1234,15 @@ impl NetDir {
})
}
/// Return the current onion service directory "time period".
/// Return the current hidden service directory "time period".
///
/// Specifically, this returns the time period that contains the beginning
/// of the validity period of this `NetDir`'s consensus. That time period
/// is the one we use when acting as an onion service client.
/// is the one we use when acting as an hidden service client.
//
// TODO HS do we need this function?
#[cfg(feature = "hs-common")]
pub fn onion_service_time_period(&self) -> TimePeriod {
pub fn hs_time_period(&self) -> TimePeriod {
self.hsdir_rings.current.time_period()
}