Add get_nodes function to AdminShared
This function will be used on restart to create peer_refs
for members in existing circuits.
@@ -1717,6 +1717,10 @@ impl AdminServiceShared {
.map_err(AdminSharedError::from)
}
+ pub fn get_nodes(&self) -> Result<BTreeMap<String, StateNode>, AdminSharedError> {
+ self.splinter_state.nodes().map_err(AdminSharedError::from)
+ }
+
fn update_splinter_state(&mut self, circuit: &Circuit) -> Result<(), AdminSharedError> {
let members: Vec<StateNode> = circuit
.get_members()
