aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2016-03-03 22:02:10 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2016-03-03 22:02:10 +0800
commitd45f01d5f782857c6a65f65fdc67b630a8f028bd (patch)
tree7ed95d81a301c466826176cba8961fcf4b8b8ea1
parent41f35d7913ffc458873c17463d5780d0fa612010 (diff)
parentae4982a365ae396f928c76e332777563c9cc6b40 (diff)
downloaddexon-d45f01d5f782857c6a65f65fdc67b630a8f028bd.tar.gz
dexon-d45f01d5f782857c6a65f65fdc67b630a8f028bd.tar.zst
dexon-d45f01d5f782857c6a65f65fdc67b630a8f028bd.zip
Merge pull request #2285 from karalabe/forward-empty-bodies
eth: forward empty body responses to the downlaoder
-rw-r--r--eth/handler.go6
1 files changed, 5 insertions, 1 deletions
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)