From a1b8ceea41940fcf30cd1f151d707c0c596f850e Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sat, 19 Apr 2025 12:21:12 +0200 Subject: [PATCH] docs: some docs on sync gap channel (#15817) --- crates/stages/api/src/pipeline/mod.rs | 4 +++- crates/stages/stages/src/stages/headers.rs | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/stages/api/src/pipeline/mod.rs b/crates/stages/api/src/pipeline/mod.rs index d95857f224..37152967a6 100644 --- a/crates/stages/api/src/pipeline/mod.rs +++ b/crates/stages/api/src/pipeline/mod.rs @@ -75,7 +75,9 @@ pub struct Pipeline { event_sender: EventSender, /// Keeps track of the progress of the pipeline. progress: PipelineProgress, - /// A receiver for the current chain tip to sync to. + /// A Sender for the current chain tip to sync to. + /// + /// This is used to notify the headers stage about a new sync target. tip_tx: Option>, metrics_tx: Option, /// Whether an unwind should fail the syncing process. Should only be set when downloading diff --git a/crates/stages/stages/src/stages/headers.rs b/crates/stages/stages/src/stages/headers.rs index b95c8bef4e..3282d3cead 100644 --- a/crates/stages/stages/src/stages/headers.rs +++ b/crates/stages/stages/src/stages/headers.rs @@ -49,6 +49,8 @@ pub struct HeaderStage { /// Strategy for downloading the headers downloader: Downloader, /// The tip for the stage. + /// + /// This determines the sync target of the stage (set by the pipeline). tip: watch::Receiver, /// Consensus client implementation consensus: Arc>,