Skip to content

Commit

Permalink
Improve logging when loading epoch start config (#11524)
Browse files Browse the repository at this point in the history
  • Loading branch information
mystenmark authored May 1, 2023
1 parent 03b738e commit a355976
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/sui-core/src/authority/authority_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ impl AuthorityStore {
) -> SuiResult<Arc<Self>> {
let perpetual_tables = Arc::new(AuthorityPerpetualTables::open(path, db_options.clone()));
let epoch_start_configuration = if perpetual_tables.database_is_empty()? {
info!("Creating new epoch start config from genesis");
let epoch_start_configuration = EpochStartConfiguration::new(
genesis.sui_system_object().into_epoch_start_state(),
*genesis.checkpoint().digest(),
Expand All @@ -159,15 +160,18 @@ impl AuthorityStore {
.await?;
epoch_start_configuration
} else {
info!("Loading epoch start config from DB");
perpetual_tables
.epoch_start_configuration
.get(&())?
.expect("Epoch start configuration must be set in non-empty DB")
};
let cur_epoch = perpetual_tables.get_recovery_epoch_at_restart()?;
info!("Epoch start config: {:?}", epoch_start_configuration);
info!("Cur epoch: {:?}", cur_epoch);
let committee = committee_store
.get_committee(&cur_epoch)?
.expect("Committee of the current epoch must exist");
.unwrap_or_else(|| panic!("Committee of the current epoch ({}) must exist", cur_epoch));
let this = Self::open_inner(
genesis,
perpetual_tables,
Expand Down

0 comments on commit a355976

Please sign in to comment.