mirror of https://github.com/status-im/op-geth.git
eth: gracefully fail if chain config is missing
This commit is contained in:
parent
9027981280
commit
aceaaa5178
|
@ -19,6 +19,7 @@ package eth
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/big"
|
"math/big"
|
||||||
"os"
|
"os"
|
||||||
|
@ -243,6 +244,9 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
|
||||||
glog.V(logger.Info).Infoln("WARNING: Wrote default ethereum genesis block")
|
glog.V(logger.Info).Infoln("WARNING: Wrote default ethereum genesis block")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if config.ChainConfig == nil {
|
||||||
|
return nil, errors.New("missing chain config")
|
||||||
|
}
|
||||||
eth.chainConfig = config.ChainConfig
|
eth.chainConfig = config.ChainConfig
|
||||||
eth.chainConfig.VmConfig = vm.Config{
|
eth.chainConfig.VmConfig = vm.Config{
|
||||||
EnableJit: config.EnableJit,
|
EnableJit: config.EnableJit,
|
||||||
|
|
Loading…
Reference in New Issue