diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-04-12 21:48:43 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-04-12 21:48:43 +0800 |
commit | aceaaa517834fa8dfc5121b66dfd633f0b10ca8f (patch) | |
tree | 3a9415c6320a7a1b81255f7232473abbbcf79307 /eth | |
parent | 90279812804cdca04a12955b83f91fbebb661082 (diff) | |
download | go-tangerine-aceaaa517834fa8dfc5121b66dfd633f0b10ca8f.tar go-tangerine-aceaaa517834fa8dfc5121b66dfd633f0b10ca8f.tar.gz go-tangerine-aceaaa517834fa8dfc5121b66dfd633f0b10ca8f.tar.bz2 go-tangerine-aceaaa517834fa8dfc5121b66dfd633f0b10ca8f.tar.lz go-tangerine-aceaaa517834fa8dfc5121b66dfd633f0b10ca8f.tar.xz go-tangerine-aceaaa517834fa8dfc5121b66dfd633f0b10ca8f.tar.zst go-tangerine-aceaaa517834fa8dfc5121b66dfd633f0b10ca8f.zip |
eth: gracefully fail if chain config is missing
Diffstat (limited to 'eth')
-rw-r--r-- | eth/backend.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/eth/backend.go b/eth/backend.go index f4282d59f..cab83588c 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -19,6 +19,7 @@ package eth import ( "bytes" + "errors" "fmt" "math/big" "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") } + if config.ChainConfig == nil { + return nil, errors.New("missing chain config") + } eth.chainConfig = config.ChainConfig eth.chainConfig.VmConfig = vm.Config{ EnableJit: config.EnableJit, |