Skip to content

Commit

Permalink
Address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
halfprice committed May 24, 2024
1 parent 1428ac5 commit 9a2e5d0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/sui-node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ impl SuiNode {
DBMetrics::init(&prometheus_registry);
mysten_metrics::init_metrics(&prometheus_registry);

let genesis = config.genesis()?;
let genesis = config.genesis()?.clone();

let secret = Arc::pin(config.protocol_key_pair().copy());
let genesis_committee = genesis.committee()?;
Expand All @@ -447,7 +447,7 @@ impl SuiNode {
.expect("Database read should not fail at init.");

let store =
AuthorityStore::open(perpetual_tables, genesis, &config, &prometheus_registry).await?;
AuthorityStore::open(perpetual_tables, &genesis, &config, &prometheus_registry).await?;

let cur_epoch = store.get_recovery_epoch_at_restart()?;
let committee = committee_store
Expand Down Expand Up @@ -587,8 +587,6 @@ impl SuiNode {
state_snapshot_handle.is_some(),
)?;

// `genesis` is immutably borrowed from config. So we have to clone a copy here.
let mut config = config.clone();
if !epoch_store
.protocol_config()
.simplified_unwrap_then_delete()
Expand Down

0 comments on commit 9a2e5d0

Please sign in to comment.