From 21c4c155ee68890a069654dcc5bc083a867f65cd Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 17 Apr 2015 16:29:07 +0200 Subject: [PATCH] eth: honour config.Shh --- eth/backend.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eth/backend.go b/eth/backend.go index 3f15be403c..bb1091f23d 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -215,10 +215,13 @@ func New(config *Config) (*Ethereum, error) { eth.txPool = core.NewTxPool(eth.EventMux(), eth.chainManager.State) eth.blockProcessor = core.NewBlockProcessor(stateDb, extraDb, eth.pow, eth.txPool, eth.chainManager, eth.EventMux()) eth.chainManager.SetProcessor(eth.blockProcessor) - eth.whisper = whisper.New() - eth.shhVersionId = int(eth.whisper.Version()) eth.miner = miner.New(eth, eth.pow, config.MinerThreads) + if config.Shh { + eth.whisper = whisper.New() + eth.shhVersionId = int(eth.whisper.Version()) + } + hasBlock := eth.chainManager.HasBlock insertChain := eth.chainManager.InsertChain td := eth.chainManager.Td()