diff options
-rw-r--r-- | plugin/params.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugin/params.go b/plugin/params.go index 403424c..9881551 100644 --- a/plugin/params.go +++ b/plugin/params.go @@ -3,6 +3,7 @@ package main import ( "encoding/json" "flag" + "os" "github.com/ava-labs/avalanchego/utils/wrappers" "github.com/ava-labs/coreth/plugin/evm" @@ -22,8 +23,15 @@ func init() { fs := flag.NewFlagSet(name, flag.ContinueOnError) config := fs.String("coreth-config", "default", "Pass in CLI Config to set runtime attributes for Coreth") + + if err := fs.Parse(os.Args[1:]); err != nil { + errs.Add(err) + return + } + if *config == "default" { cliConfig.EthAPIEnabled = true + cliConfig.TxPoolAPIEnabled = true } else { errs.Add(json.Unmarshal([]byte(*config), &cliConfig)) } |