diff options
author | obscuren <geffobscura@gmail.com> | 2015-06-16 01:28:48 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-06-16 01:28:48 +0800 |
commit | 5daf8729be88eca87b302ebf7a46fc69cad0f6d0 (patch) | |
tree | 0053cb5b84978645b3c83895a651c512e081a183 /eth/handler.go | |
parent | bac9a94ddf20dc530966cbf6cd384aaf94aedc77 (diff) | |
parent | 4673b04503742de9b1622557b44135d6a4934ad6 (diff) | |
download | go-tangerine-5daf8729be88eca87b302ebf7a46fc69cad0f6d0.tar go-tangerine-5daf8729be88eca87b302ebf7a46fc69cad0f6d0.tar.gz go-tangerine-5daf8729be88eca87b302ebf7a46fc69cad0f6d0.tar.bz2 go-tangerine-5daf8729be88eca87b302ebf7a46fc69cad0f6d0.tar.lz go-tangerine-5daf8729be88eca87b302ebf7a46fc69cad0f6d0.tar.xz go-tangerine-5daf8729be88eca87b302ebf7a46fc69cad0f6d0.tar.zst go-tangerine-5daf8729be88eca87b302ebf7a46fc69cad0f6d0.zip |
Merge branch 'release/0.9.30'v0.9.30
Diffstat (limited to 'eth/handler.go')
-rw-r--r-- | eth/handler.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/handler.go b/eth/handler.go index f002727f3..ec4f2d53a 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -68,12 +68,11 @@ type ProtocolManager struct { // NewProtocolManager returns a new ethereum sub protocol manager. The Ethereum sub protocol manages peers capable // with the ethereum network. -func NewProtocolManager(protocolVersion, networkId int, mux *event.TypeMux, txpool txPool, chainman *core.ChainManager, downloader *downloader.Downloader) *ProtocolManager { +func NewProtocolManager(protocolVersion, networkId int, mux *event.TypeMux, txpool txPool, chainman *core.ChainManager) *ProtocolManager { manager := &ProtocolManager{ eventMux: mux, txpool: txpool, chainman: chainman, - downloader: downloader, peers: newPeerSet(), newPeerCh: make(chan *peer, 1), newHashCh: make(chan []*blockAnnounce, 1), @@ -81,6 +80,7 @@ func NewProtocolManager(protocolVersion, networkId int, mux *event.TypeMux, txpo txsyncCh: make(chan *txsync), quitSync: make(chan struct{}), } + manager.downloader = downloader.New(manager.eventMux, manager.chainman.HasBlock, manager.chainman.GetBlock, manager.chainman.InsertChain, manager.removePeer) manager.SubProtocol = p2p.Protocol{ Name: "eth", Version: uint(protocolVersion), |