Skip to content

Commit

Permalink
Re-use environment from runtime.Context argument
Browse files Browse the repository at this point in the history
  • Loading branch information
m-Peter committed Apr 16, 2024
1 parent 95d5b8c commit e0f8a9b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/test_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,11 @@ func (r *TestRunner) parseAndCheckImport(

env.CheckerConfig.ContractValueHandler = contractValueHandler

err = setupEVMEnvironment(r.backend.blockchain.NewScriptEnvironment(), env)
fvmEnv, ok := startCtx.Interface.(environment.Environment)
if !ok {
panic(fmt.Errorf("failed to retrieve FVM Environment"))
}
err = setupEVMEnvironment(fvmEnv, env)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit e0f8a9b

Please sign in to comment.