aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/gethrpctest/main.go3
-rw-r--r--eth/backend.go4
2 files changed, 7 insertions, 0 deletions
diff --git a/cmd/gethrpctest/main.go b/cmd/gethrpctest/main.go
index b25166f4f..2e07e9426 100644
--- a/cmd/gethrpctest/main.go
+++ b/cmd/gethrpctest/main.go
@@ -26,11 +26,13 @@ import (
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/node"
+ "github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/tests"
"github.com/ethereum/go-ethereum/whisper"
)
@@ -128,6 +130,7 @@ func MakeSystemNode(keydir string, privkey string, test *tests.BlockTest) (*node
ethConf := &eth.Config{
TestGenesisState: db,
TestGenesisBlock: test.Genesis,
+ ChainConfig: &core.ChainConfig{HomesteadBlock: params.MainNetHomesteadBlock},
AccountManager: accman,
}
if err := stack.Register(func(ctx *node.ServiceContext) (node.Service, error) { return eth.New(ctx, ethConf) }); err != nil {
diff --git a/eth/backend.go b/eth/backend.go
index 12ce30767..ea12e4215 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,