GuardMgr: Remove no-longer-relevant `TODO pt-client` comments

Also remove a bunch of now-unnecessary `allow(dead_code)`
annotations.
This commit is contained in:
Nick Mathewson 2022-11-04 15:47:08 -04:00
parent 1418ec13a8
commit 6bcce19655
4 changed files with 0 additions and 21 deletions

View File

@ -1,5 +1,4 @@
//! Configuration logic and types for bridges.
#![allow(dead_code)] // TODO pt-client: remove.
use std::fmt::{self, Display};
use std::net::SocketAddr;
@ -74,16 +73,6 @@ pub struct BridgeConfig {
// and check that the toml looks okay. For discussion see
// https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/704/diffs#note_2835271
// TODO pt-client Additionally, make sure that Bridge can be deserialized from a string,
// when that string is a "bridge" line.
// TODO pt-client We want a "list of bridges'" configuration type
//
// TODO pt-client we want a "should we use bridges at this moment"
// configuration object.
//
// (These last two might be part of the same configuration type.)
impl HasRelayIds for BridgeConfig {
fn identity(&self, key_type: RelayIdType) -> Option<RelayIdRef<'_>> {
match key_type {

View File

@ -149,7 +149,6 @@ pub(crate) struct BridgeSet {
impl BridgeSet {
/// Create a new `BridgeSet` from its configuration.
#[allow(dead_code)] // TODO pt-client remove
pub(crate) fn new(config: Arc<[BridgeConfig]>, descs: Option<Arc<BridgeDescList>>) -> Self {
Self {
config_last_changed: SystemTime::now(), // TODO pt-client wrong.

View File

@ -291,7 +291,6 @@ struct GuardSets {
/// Unrecognized fields, including (possibly) other guard sets.
#[serde(flatten)]
remaining: HashMap<String, tor_persist::JsonValue>,
// TODO pt-client: There must also be a "bridges" GuardSet instance.
}
/// The key (filename) we use for storing our persistent guard state in the
@ -1478,7 +1477,6 @@ enum FirstHopInner {
Chan(OwnedChanTarget),
/// We have enough information to connect to a guards _and_ to build
/// multihop circuits through it.
#[allow(dead_code)] // TODO pt-client
Circ(OwnedCircTarget),
}
@ -1509,9 +1507,6 @@ impl FirstHop {
}
/// If possible, return a view of this object that can be used to build a circuit.
///
/// TODO pt-client: This will need to return "Some" only for bridges that have
/// a bridge descriptor.
pub fn as_circ_target(&self) -> Option<&OwnedCircTarget> {
match &self.inner {
FirstHopInner::Chan(_) => None,

View File

@ -1,9 +1,5 @@
//! Logic for manipulating a sampled set of guards, along with various
//! orderings on that sample.
//
// TODO pt-client: We must teach GuardSet to handle bridges. That requires us to:
// - allow use of BridgeList in place of NetDir, possibly via a trait implemented by both.
// - allow Guard to be constructed from a Bridge rather than a Relay
mod candidate;