Skip to content

Commit 869d979

Browse files
karalabeobscuren
authored andcommitted
[release/1.3.5] eth: forward empty body responses to the downlaoder
(cherry picked from commit ae4982a)
1 parent d3f8b76 commit 869d979

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

eth/handler.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,11 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
491491
uncles[i] = body.Uncles
492492
}
493493
// Filter out any explicitly requested bodies, deliver the rest to the downloader
494-
if trasactions, uncles := pm.fetcher.FilterBodies(trasactions, uncles, time.Now()); len(trasactions) > 0 || len(uncles) > 0 {
494+
filter := len(trasactions) > 0 || len(uncles) > 0
495+
if filter {
496+
trasactions, uncles = pm.fetcher.FilterBodies(trasactions, uncles, time.Now())
497+
}
498+
if len(trasactions) > 0 || len(uncles) > 0 || !filter {
495499
err := pm.downloader.DeliverBodies(p.id, trasactions, uncles)
496500
if err != nil {
497501
glog.V(logger.Debug).Infoln(err)

0 commit comments

Comments
 (0)