diff options
Diffstat (limited to 'eth/backend.go')
-rw-r--r-- | eth/backend.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/eth/backend.go b/eth/backend.go index 9ec3c1440..04dd3767a 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -89,6 +89,7 @@ type Config struct { GenesisFile string GenesisBlock *types.Block // used by block tests Olympic bool + Mode Mode BlockChainVersion int SkipBcVersionCheck bool // e.g. blockchain export @@ -398,8 +399,9 @@ func New(config *Config) (*Ethereum, error) { eth.blockProcessor = core.NewBlockProcessor(chainDb, eth.pow, eth.blockchain, eth.EventMux()) eth.blockchain.SetProcessor(eth.blockProcessor) - eth.protocolManager = NewProtocolManager(config.NetworkId, eth.eventMux, eth.txPool, eth.pow, eth.blockchain, chainDb) - + if eth.protocolManager, err = NewProtocolManager(config.Mode, config.NetworkId, eth.eventMux, eth.txPool, eth.pow, eth.blockchain, chainDb); err != nil { + return nil, err + } eth.miner = miner.New(eth, eth.EventMux(), eth.pow) eth.miner.SetGasPrice(config.GasPrice) eth.miner.SetExtra(config.ExtraData) |