diff options
author | Miya Chen <miyatlchen@gmail.com> | 2017-10-10 16:53:05 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-10-10 16:53:05 +0800 |
commit | 40a3856af9d28fce6550509a01cf926525da5d22 (patch) | |
tree | 453bc3d073c053f555741a9a0126f7dee7597e76 /eth/handler.go | |
parent | 89860f4197cb9bd2249c9ac4d854f3bc401a7926 (diff) | |
download | dexon-40a3856af9d28fce6550509a01cf926525da5d22.tar.gz dexon-40a3856af9d28fce6550509a01cf926525da5d22.tar.zst dexon-40a3856af9d28fce6550509a01cf926525da5d22.zip |
eth/fetcher: check the origin of filter tasks (#14975)
* eth/fetcher: check the origin of filter task
* eth/fetcher: add some details to fetcher logs
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 cee719ddb..bec5126dc 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -450,7 +450,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { return nil } // Irrelevant of the fork checks, send the header to the fetcher just in case - headers = pm.fetcher.FilterHeaders(headers, time.Now()) + headers = pm.fetcher.FilterHeaders(p.id, headers, time.Now()) } if len(headers) > 0 || !filter { err := pm.downloader.DeliverHeaders(p.id, headers) @@ -503,7 +503,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { // Filter out any explicitly requested bodies, deliver the rest to the downloader filter := len(trasactions) > 0 || len(uncles) > 0 if filter { - trasactions, uncles = pm.fetcher.FilterBodies(trasactions, uncles, time.Now()) + trasactions, uncles = pm.fetcher.FilterBodies(p.id, trasactions, uncles, time.Now()) } if len(trasactions) > 0 || len(uncles) > 0 || !filter { err := pm.downloader.DeliverBodies(p.id, trasactions, uncles) |