diff options
Diffstat (limited to 'src/state')
| -rw-r--r-- | src/state/mod.rs | 2 | ||||
| -rw-r--r-- | src/state/peer.rs | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/state/mod.rs b/src/state/mod.rs index 53d8178..e127877 100644 --- a/src/state/mod.rs +++ b/src/state/mod.rs @@ -154,6 +154,8 @@ pub(crate) struct AppState { /// The slow round after changes passed on along writers' trees is scheduled /// (`swarm::relay`). pub(crate) announce_slow: Arc<std::sync::Mutex<Option<crate::swarm::relay::Pending>>>, + /// How long the next slow round waits. + pub(crate) slow_rounds: Arc<std::sync::Mutex<crate::swarm::relay::SlowRounds>>, /// Distances in writers' trees (`swarm::tree`). pub(crate) trees: Arc<std::sync::Mutex<crate::swarm::tree::Trees>>, /// Whom we reach, as told our neighbours (`swarm::reach`). diff --git a/src/state/peer.rs b/src/state/peer.rs index 32b35fc..8f79886 100644 --- a/src/state/peer.rs +++ b/src/state/peer.rs @@ -153,6 +153,8 @@ pub(crate) struct PeerState { /// with its epoch: once they are ours, it has every change we would announce to it /// (`swarm::relay`). pub(crate) last_heads: Option<(transport::Epoch, transport::HeadsSummary)>, + /// When we last told it our heads in a slow round (`swarm::relay::SlowRounds`). + pub(crate) slow_announced_at: Option<Instant>, /// Whom it said it reaches (`swarm::reach`), by pair key, and when. pub(crate) reaches: Option<(Instant, Vec<u64>)>, /// Whose change the next sync message to it passes on along the writer's tree @@ -286,6 +288,7 @@ impl PeerState { syncs_with_us: None, reported_heads: None, last_heads: None, + slow_announced_at: None, reaches: None, tree_writer: None, left: false, |
