Skip to content

Commit

Permalink
cmd/evm: Add --vm.evm flag to support EVMC (ethereum#18457)
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast authored and gballet committed Jan 16, 2019
1 parent f50d66f commit d37f987
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions cmd/evm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ var (
Name: "nostack",
Usage: "disable stack output",
}
EVMInterpreterFlag = cli.StringFlag{
Name: "vm.evm",
Usage: "External EVM configuration (default = built-in interpreter)",
Value: "",
}
)

func init() {
Expand All @@ -133,6 +138,7 @@ func init() {
ReceiverFlag,
DisableMemoryFlag,
DisableStackFlag,
EVMInterpreterFlag,
}
app.Commands = []cli.Command{
compileCommand,
Expand Down
5 changes: 3 additions & 2 deletions cmd/evm/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ func runCmd(ctx *cli.Context) error {
Coinbase: genesisConfig.Coinbase,
BlockNumber: new(big.Int).SetUint64(genesisConfig.Number),
EVMConfig: vm.Config{
Tracer: tracer,
Debug: ctx.GlobalBool(DebugFlag.Name) || ctx.GlobalBool(MachineFlag.Name),
Tracer: tracer,
Debug: ctx.GlobalBool(DebugFlag.Name) || ctx.GlobalBool(MachineFlag.Name),
EVMInterpreter: ctx.GlobalString(EVMInterpreterFlag.Name),
},
}

Expand Down

0 comments on commit d37f987

Please sign in to comment.