From ae4982a365ae396f928c76e332777563c9cc6b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Thu, 3 Mar 2016 13:06:23 +0200 Subject: [PATCH] eth: forward empty body responses to the downlaoder --- eth/handler.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eth/handler.go b/eth/handler.go index e8bac23c3..f11a69550 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -493,7 +493,11 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { uncles[i] = body.Uncles } // Filter out any explicitly requested bodies, deliver the rest to the downloader - if trasactions, uncles := pm.fetcher.FilterBodies(trasactions, uncles, time.Now()); len(trasactions) > 0 || len(uncles) > 0 { + filter := len(trasactions) > 0 || len(uncles) > 0 + if filter { + trasactions, uncles = pm.fetcher.FilterBodies(trasactions, uncles, time.Now()) + } + if len(trasactions) > 0 || len(uncles) > 0 || !filter { err := pm.downloader.DeliverBodies(p.id, trasactions, uncles) if err != nil { glog.V(logger.Debug).Infoln(err)