aboutsummaryrefslogtreecommitdiffstats
path: root/eth/backend.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-01 06:23:51 +0800
committerobscuren <geffobscura@gmail.com>2015-05-01 21:58:44 +0800
commit016f152b36106130fa42514ef6cfacc09dfc3142 (patch)
treea38fa42c59a8a4e0c18b68fc8e5dcb6bd533719b /eth/backend.go
parent8595198c1b56364bb9589a912d2a9797b93a3357 (diff)
downloadgo-tangerine-016f152b36106130fa42514ef6cfacc09dfc3142.tar
go-tangerine-016f152b36106130fa42514ef6cfacc09dfc3142.tar.gz
go-tangerine-016f152b36106130fa42514ef6cfacc09dfc3142.tar.bz2
go-tangerine-016f152b36106130fa42514ef6cfacc09dfc3142.tar.lz
go-tangerine-016f152b36106130fa42514ef6cfacc09dfc3142.tar.xz
go-tangerine-016f152b36106130fa42514ef6cfacc09dfc3142.tar.zst
go-tangerine-016f152b36106130fa42514ef6cfacc09dfc3142.zip
eth, eth/downloader: Moved block processing & graceful shutdown
The downloader is no longer responsible for processing blocks. The eth-protocol handler now takes care of this instead. Added graceful shutdown during block processing. Closes #846
Diffstat (limited to 'eth/backend.go')
-rw-r--r--eth/backend.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/backend.go b/eth/backend.go
index 11a63cca9..a8b0fae50 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -219,7 +219,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.downloader = downloader.New(eth.chainManager.HasBlock, eth.chainManager.GetBlock)
eth.pow = ethash.New(eth.chainManager)
eth.txPool = core.NewTxPool(eth.EventMux(), eth.chainManager.State, eth.chainManager.GasLimit)
eth.blockProcessor = core.NewBlockProcessor(stateDb, extraDb, eth.pow, eth.txPool, eth.chainManager, eth.EventMux())
@@ -454,8 +454,8 @@ func (self *Ethereum) SuggestPeer(nodeURL string) error {
func (s *Ethereum) Stop() {
s.txSub.Unsubscribe() // quits txBroadcastLoop
- s.chainManager.Stop()
s.protocolManager.Stop()
+ s.chainManager.Stop()
s.txPool.Stop()
s.eventMux.Stop()
if s.whisper != nil {