diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-06-29 22:37:55 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-07-01 00:00:01 +0800 |
commit | af51dc4d637dbbb0d416032304f84d52d4f6d951 (patch) | |
tree | 2d455e99559c58e28bddfb8981d44d844b3cddd1 /eth/downloader/downloader.go | |
parent | aac2b6ae4c5cf6f78547159c47f9192babe3e6dd (diff) | |
download | go-tangerine-af51dc4d637dbbb0d416032304f84d52d4f6d951.tar go-tangerine-af51dc4d637dbbb0d416032304f84d52d4f6d951.tar.gz go-tangerine-af51dc4d637dbbb0d416032304f84d52d4f6d951.tar.bz2 go-tangerine-af51dc4d637dbbb0d416032304f84d52d4f6d951.tar.lz go-tangerine-af51dc4d637dbbb0d416032304f84d52d4f6d951.tar.xz go-tangerine-af51dc4d637dbbb0d416032304f84d52d4f6d951.tar.zst go-tangerine-af51dc4d637dbbb0d416032304f84d52d4f6d951.zip |
eth, eth/downloader: pass the eth protocol version through
Diffstat (limited to 'eth/downloader/downloader.go')
-rw-r--r-- | eth/downloader/downloader.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 39976aae1..1b31f5dbd 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -175,7 +175,7 @@ func (d *Downloader) Synchronising() bool { // RegisterPeer injects a new download peer into the set of block source to be // used for fetching hashes and blocks from. -func (d *Downloader) RegisterPeer(id string, head common.Hash, getHashes hashFetcherFn, getBlocks blockFetcherFn) error { +func (d *Downloader) RegisterPeer(id string, version int, head common.Hash, getHashes hashFetcherFn, getBlocks blockFetcherFn) error { // If the peer wants to send a banned hash, reject if d.banned.Has(head) { glog.V(logger.Debug).Infoln("Register rejected, head hash banned:", id) @@ -183,7 +183,7 @@ func (d *Downloader) RegisterPeer(id string, head common.Hash, getHashes hashFet } // Otherwise try to construct and register the peer glog.V(logger.Detail).Infoln("Registering peer", id) - if err := d.peers.Register(newPeer(id, head, getHashes, getBlocks)); err != nil { + if err := d.peers.Register(newPeer(id, version, head, getHashes, getBlocks)); err != nil { glog.V(logger.Error).Infoln("Register failed:", err) return err } |