aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc/netstatus/rs/plain.rs
blob: 2f074761e1749bef2ed3699a69c0e80f4d4b7ad7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//! Implementation for the style of router status entries used in
//! old-style "ns" consensus documents.
//
// Read this file in conjunction with `each_variety.rs`.
// See "module scope" ns_variety_definition_macros.rs.

use super::*;

// Import `each_variety.rs`, appropriately variegated
ns_do_variety_plain! {}

pub(crate) use crate::doc::routerdesc::{DOC_DIGEST_LEN, RdDigest as DocDigest};

/// The flavor
const FLAVOR: ConsensusFlavor = ConsensusFlavor::Plain;

impl RouterStatus {
    /// Return the expected router descriptor digest for this routerstatus
    pub fn rd_digest(&self) -> &DocDigest {
        self.doc_digest()
    }
}