diff --git a/src/routing/approved.rs b/src/routing/approved.rs index b5d9e6498a..fcbb4063cd 100644 --- a/src/routing/approved.rs +++ b/src/routing/approved.rs @@ -91,6 +91,10 @@ impl Approved { Ok(Self::new(node, section, Some(section_key_share), event_tx)) } + pub fn section_chain(&self) -> SectionChain { + self.section.chain().clone() + } + // Creates the approved state for a regular node. pub fn new( node: Node, diff --git a/src/routing/mod.rs b/src/routing/mod.rs index fea3a2756b..6c61c49eda 100644 --- a/src/routing/mod.rs +++ b/src/routing/mod.rs @@ -205,6 +205,11 @@ impl Routing { self.stage.comm.our_connection_info() } + /// Returns the Section Proof Chain + pub async fn section_chain(&self) -> SectionChain { + self.stage.state.lock().await.section_chain() + } + /// Prefix of our section pub async fn our_prefix(&self) -> Prefix { *self.stage.state.lock().await.section().prefix()