Commit 12d1752a authored by Nick Mathewson's avatar Nick Mathewson 🦀
Browse files

tor-netdoc: Add a Lifetime::valid_at method.

parent 0597c31a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -136,6 +136,10 @@ impl Lifetime {
    pub fn valid_until(&self) -> time::SystemTime {
        self.valid_until
    }
    /// Return true if this consensus is officially valid at the provided time.
    pub fn valid_at(&self, when: time::SystemTime) -> bool {
        self.valid_after <= when && when <= self.valid_until
    }
}

/// A set of named network parameters.
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ BREAKING: Added new cache_trust element to DirMgrConfig.
### tor-netdoc

BREAKING: Routerstatus::nickname() now returns &str, not &String.
MODIFIED: Lifetime has a valid_at() method.

### tor-persist