Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions finalizer/src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,12 @@ impl<
if let Some(checkpoint) = &self.state.pending_checkpoint {
self.db.store_finalized_checkpoint(checkpoint).await;
}

// Increment epoch
self.state.epoch += 1;
// Set the epoch genesis hash for the next epoch
self.state.epoch_genesis_hash = block.digest().0;

self.db.store_consensus_state(new_height, &self.state).await;
// This will commit all changes to the state db
self.db.commit().await;
Expand All @@ -446,11 +452,6 @@ impl<
histogram!("database_operations_duration_millis").record(db_operations_duration);
}

// Increment epoch
self.state.epoch += 1;
// Set the epoch genesis hash for the next epoch
self.state.epoch_genesis_hash = block.digest().0;

// Create the list of validators for the new epoch
let active_validators = self.state.get_active_validators();
let network_keys = active_validators
Expand Down