eth, eth/downloader: don't require td on downloader. Fixed tests
This commit is contained in:
@ -217,7 +217,7 @@ func New(config *Config) (*Ethereum, error) {
|
||||
}
|
||||
|
||||
eth.chainManager = core.NewChainManager(blockDb, stateDb, eth.EventMux())
|
||||
eth.downloader = downloader.New(eth.chainManager.HasBlock, eth.chainManager.InsertChain, eth.chainManager.Td)
|
||||
eth.downloader = downloader.New(eth.chainManager.HasBlock, eth.chainManager.InsertChain)
|
||||
eth.pow = ethash.New(eth.chainManager)
|
||||
eth.txPool = core.NewTxPool(eth.EventMux(), eth.chainManager.State)
|
||||
eth.blockProcessor = core.NewBlockProcessor(stateDb, extraDb, eth.pow, eth.txPool, eth.chainManager, eth.EventMux())
|
||||
@ -448,7 +448,7 @@ func (self *Ethereum) SuggestPeer(nodeURL string) error {
|
||||
}
|
||||
|
||||
func (s *Ethereum) Stop() {
|
||||
s.txSub.Unsubscribe() // quits txBroadcastLoop
|
||||
s.txSub.Unsubscribe() // quits txBroadcastLoop
|
||||
|
||||
s.protocolManager.Stop()
|
||||
s.txPool.Stop()
|
||||
|
Reference in New Issue
Block a user