Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
radicle: note about Announcer::can_continue
Fintan Halpenny committed 8 months ago
commit c15288a690416765c868f74cbf3dc4c7fe0b03fe
parent 1b33229dd2d6f80cc544a3a5709c5355e6afa2bd
1 file changed +5 -0
modified crates/radicle/src/node/sync/announce.rs
@@ -135,6 +135,11 @@ impl Announcer {
    /// If there are no more nodes, then [`NoNodes`] is returned in the
    /// [`ControlFlow::Break`], otherwise the [`Announcer`] is returned as-is in
    /// the [`ControlFlow::Continue`].
+
    // TODO(finto): I'm not sure this is needed with the change to the target
+
    // logic. Since we can reach the replication factor OR the preferred seeds,
+
    // AND the replication factor is always capped to the maximum number of
+
    // seeds to sync with, I don't think we can ever reach a case where
+
    // `can_continue` hits the `Break`.
    pub fn can_continue(self) -> ControlFlow<NoNodes, Self> {
        if self.to_sync.is_empty() {
            ControlFlow::Break(NoNodes {