Skip to content

Commit

Permalink
migration: Make migration-block-time a required flag (#242)
Browse files Browse the repository at this point in the history
Make migration-block-time a required flag

---------

Co-authored-by: alecps <[email protected]>
Co-authored-by: piersy <[email protected]>
  • Loading branch information
3 people authored and karlb committed Oct 14, 2024
1 parent 19db904 commit 8e1df24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 3 additions & 2 deletions op-chain-ops/cmd/celo-migrate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ var (
Required: true,
}
migrationBlockTimeFlag = &cli.Uint64Flag{
Name: "migration-block-time",
Usage: "Specifies a unix timestamp to use for the migration block. If not provided, the current time will be used.",
Name: "migration-block-time",
Usage: "Specifies a unix timestamp to use for the migration block. This should be set to the same timestamp as was used for the sequencer migration. If performing the sequencer migration, this should set to a time in the future around when the migration script is expected to complete.",
Required: true,
}
oldDBPathFlag = &cli.PathFlag{
Name: "old-db",
Expand Down
5 changes: 0 additions & 5 deletions op-chain-ops/cmd/celo-migrate/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"math/big"
"os"
"time"

"github.com/ethereum-optimism/optimism/op-chain-ops/genesis"
"github.com/ethereum-optimism/optimism/op-service/ioutil"
Expand Down Expand Up @@ -157,10 +156,6 @@ func applyStateMigrationChanges(config *genesis.DeployConfig, l2Allocs types.Gen
return nil, err
}

if migrationBlockTime == 0 {
migrationBlockTime = uint64(time.Now().Unix())
}

// Set the standard options.
cfg.LondonBlock = migrationBlockNumber
cfg.BerlinBlock = migrationBlockNumber
Expand Down

0 comments on commit 8e1df24

Please sign in to comment.