Skip to content

Commit

Permalink
core: test regolith time in genesis setup from superchain-registry
Browse files Browse the repository at this point in the history
  • Loading branch information
protolambda committed Oct 4, 2023
1 parent b21ac42 commit 80ac0fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/superchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func TestRegistryChainConfigOverride(t *testing.T) {
if genesis.Config.RegolithTime == nil {
t.Fatal("expected non-nil regolith time")
}
expectedRegolithTime := *genesis.Config.RegolithTime
genesis.Config.RegolithTime = nil

// initialize the DB
Expand All @@ -47,5 +48,7 @@ func TestRegistryChainConfigOverride(t *testing.T) {
// check if we have a corrected chain config
if chainConfig.RegolithTime == nil {
t.Fatal("expected regolith time to be corrected, but time is still nil")
} else if *chainConfig.RegolithTime != expectedRegolithTime {
t.Fatalf("expected regolith time to be %d, but got %d", expectedRegolithTime, *chainConfig.RegolithTime)
}
}

0 comments on commit 80ac0fa

Please sign in to comment.