Skip to content

Commit

Permalink
fix: run update_stake_distribution before inform_epoch, as it's n…
Browse files Browse the repository at this point in the history
…ow needed to record the total number of SPOs and total stake in the Epoch service
  • Loading branch information
dlachaume committed Nov 8, 2024
1 parent 3abbfa9 commit 13cd95a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mithril-aggregator/src/runtime/state_machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,10 @@ impl AggregatorRuntime {
.update_era_checker(new_time_point.epoch)
.await
.map_err(|e| RuntimeError::critical("transiting IDLE → READY", Some(e)))?;
self.runner.inform_new_epoch(new_time_point.epoch).await?;
self.runner
.update_stake_distribution(&new_time_point)
.await?;
self.runner.inform_new_epoch(new_time_point.epoch).await?;
self.runner.upkeep().await?;
self.runner
.open_signer_registration_round(&new_time_point)
Expand Down

0 comments on commit 13cd95a

Please sign in to comment.