From 40a3856af9d28fce6550509a01cf926525da5d22 Mon Sep 17 00:00:00 2001 From: Miya Chen Date: Tue, 10 Oct 2017 16:53:05 +0800 Subject: 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 --- eth/handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'eth/handler.go') 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) -- cgit