Skip to content

Commit

Permalink
Persist network config after fetching from peer
Browse files Browse the repository at this point in the history
  • Loading branch information
jbearer committed Jul 15, 2024
1 parent 3cc1a3f commit f11bac2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sequencer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ pub async fn init_node<P: PersistenceOptions, Ver: StaticVersionType + 'static>(
tracing::info!(?peers, "loading network config from peers");
let peers = StatePeers::<Ver>::from_urls(peers, network_params.catchup_backoff);
let config = peers.fetch_config(my_config.clone()).await;

tracing::info!(
node_id = config.node_index,
stake_table = ?config.config.known_nodes_with_stake,
"loaded config",
);
persistence.save_config(&config).await?;
(config, false)
}
// Otherwise, this is a fresh network; load from the orchestrator.
Expand Down

0 comments on commit f11bac2

Please sign in to comment.