netdir: more documentation on MIDDLE_ONLY flag.
Clarify that it isn't anything that most users will need to check.
This commit is contained in:
parent
7d23daf0dd
commit
3985700216
|
@ -467,6 +467,10 @@ bitflags! {
|
|||
const HSDIR = (1<<5);
|
||||
/// Set if this relay is considered "middle only", not suitable to run
|
||||
/// as an exit or guard relay.
|
||||
///
|
||||
/// Note that this flag is only used by authorities as part of
|
||||
/// the voting process; clients do not and should not act
|
||||
/// based on whether it is set.
|
||||
const MIDDLE_ONLY = (1<<12);
|
||||
/// If set, there is no consensus for the ed25519 key for this relay.
|
||||
const NO_ED_CONSENSUS = (1<<6);
|
||||
|
|
|
@ -160,6 +160,10 @@ macro_rules! implement_accessors {
|
|||
self.rs.flags.contains(RelayFlags::HSDIR)
|
||||
}
|
||||
/// Return true if this routerstatus is listed with the MiddleOnly flag.
|
||||
///
|
||||
/// Note that this flag is only used by authorities as part of
|
||||
/// the voting process; clients do not and should not act
|
||||
/// based on whether it is set.
|
||||
pub fn is_flagged_middle_only(&self) -> bool {
|
||||
self.rs.flags.contains(RelayFlags::MIDDLE_ONLY)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue