Skip to content

Commit

Permalink
chore(migration): rename variable safeBlockNum to safeBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
Pangssu committed Dec 27, 2024
1 parent bf9ef9a commit f33935b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions migration/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ func (m *StateMigrator) Start() {
for {
select {
case <-ticker.C:
safeBlockNum := m.backend.BlockChain().CurrentSafeBlock()
safeBlock := m.backend.BlockChain().CurrentSafeBlock()
// Skip block that have already been migrated.
if safeBlockNum == nil || m.migratedRef.BlockNumber() >= safeBlockNum.Number.Uint64() {
if safeBlock == nil || m.migratedRef.BlockNumber() >= safeBlock.Number.Uint64() {
continue
}
if m.backend.BlockChain().Config().IsKromaMPT(safeBlockNum.Time) {
if m.backend.BlockChain().Config().IsKromaMPT(safeBlock.Time) {
return
}
err := m.applyNewStateTransition(safeBlockNum.Number.Uint64())
err := m.applyNewStateTransition(safeBlock.Number.Uint64())
if err != nil {
log.Error("Failed to apply new state transition", "error", err)
}
Expand Down

0 comments on commit f33935b

Please sign in to comment.