Skip to content

Commit

Permalink
simulators/ethereum/engine: Add ForkConfig to environment
Browse files Browse the repository at this point in the history
  • Loading branch information
marioevz committed Jun 30, 2023
1 parent 7c2723f commit 2baaf11
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions simulators/ethereum/engine/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ func addTestsToSuite(sim *hivesim.Simulation, suite *hivesim.Suite, tests []test
t,
c,
genesis,
&forkConfig,
newParams,
testFiles,
)
Expand Down
2 changes: 1 addition & 1 deletion simulators/ethereum/engine/suites/sync/tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func AddSyncTestsToSuite(sim *hivesim.Simulation, suite *hivesim.Suite, tests []
}

// Run the test case
test.Run(currentTest, big.NewInt(ttd), timeout, t, c, &genesis, syncClientParams, testFiles.Copy())
test.Run(currentTest, big.NewInt(ttd), timeout, t, c, &genesis, nil, syncClientParams, testFiles.Copy())
},
})
}
Expand Down
4 changes: 3 additions & 1 deletion simulators/ethereum/engine/test/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ type Env struct {

// Client parameters used to launch the default client
Genesis *core.Genesis
ForkConfig *globals.ForkConfig
ClientParams hivesim.Params
ClientFiles hivesim.Params

// Sets the type of transactions to use during the test
TestTransactionType helper.TestTransactionType
}

func Run(testSpec SpecInterface, ttd *big.Int, timeout time.Duration, t *hivesim.T, c *hivesim.Client, genesis *core.Genesis, cParams hivesim.Params, cFiles hivesim.Params) {
func Run(testSpec SpecInterface, ttd *big.Int, timeout time.Duration, t *hivesim.T, c *hivesim.Client, genesis *core.Genesis, forkConfig *globals.ForkConfig, cParams hivesim.Params, cFiles hivesim.Params) {
// Setup the CL Mocker for this test
consensusConfig := testSpec.GetConsensusConfig()
clMocker := clmock.NewCLMocker(
Expand Down Expand Up @@ -87,6 +88,7 @@ func Run(testSpec SpecInterface, ttd *big.Int, timeout time.Duration, t *hivesim
HiveEngine: ec,
CLMock: clMocker,
Genesis: genesis,
ForkConfig: forkConfig,
ClientParams: cParams,
ClientFiles: cFiles,
TestTransactionType: testSpec.GetTestTransactionType(),
Expand Down

0 comments on commit 2baaf11

Please sign in to comment.