Skip to content

Commit f91bedb

Browse files
committed
make aggregator to warn when upcoming era is not supported
1 parent 67e7fae commit f91bedb

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

mithril-aggregator/src/runtime/runner.rs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -627,13 +627,23 @@ impl AggregatorRunnerTrait for AggregatorRunner {
627627
.map_err(|e| {
628628
RuntimeError::General(format!("Could not get Era information ('{e}')").into())
629629
})?;
630-
self.dependencies.era_checker.change_era(
631-
token.get_current_supported_era().map_err(|e| {
632-
RuntimeError::General(format!("Could not update EraChecker service ('{e}')").into())
633-
})?,
634-
token.get_current_epoch(),
630+
let current_era = token.get_current_supported_era().map_err(|e| {
631+
RuntimeError::General(format!("Could not update EraChecker service ('{e}')").into())
632+
})?;
633+
self.dependencies
634+
.era_checker
635+
.change_era(current_era, token.get_current_epoch());
636+
debug!(
637+
"Current Era is {} (Epoch {}).",
638+
current_era,
639+
token.get_current_epoch()
635640
);
636641

642+
if token.get_next_supported_era().is_err() {
643+
let era_name = &token.get_next_era_marker().unwrap().name;
644+
warn!("Upcoming Era '{era_name}' is not supported by this version of the software. Please update!");
645+
}
646+
637647
Ok(())
638648
}
639649
}

mithril-signer/src/runtime/runner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ impl Runner for SignerRunner {
448448
self.services
449449
.era_checker
450450
.change_era(current_era, era_token.get_current_epoch());
451-
info!(
451+
debug!(
452452
"Current Era is {} (Epoch {}).",
453453
current_era,
454454
era_token.get_current_epoch()

0 commit comments

Comments
 (0)