Skip to content

Commit ae4982a

Browse files
committed
eth: forward empty body responses to the downlaoder
1 parent 41f35d7 commit ae4982a

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
@@ -493,7 +493,11 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
493493
uncles[i] = body.Uncles
494494
}
495495
// Filter out any explicitly requested bodies, deliver the rest to the downloader
496-
if trasactions, uncles := pm.fetcher.FilterBodies(trasactions, uncles, time.Now()); len(trasactions) > 0 || len(uncles) > 0 {
496+
filter := len(trasactions) > 0 || len(uncles) > 0
497+
if filter {
498+
trasactions, uncles = pm.fetcher.FilterBodies(trasactions, uncles, time.Now())
499+
}
500+
if len(trasactions) > 0 || len(uncles) > 0 || !filter {
497501
err := pm.downloader.DeliverBodies(p.id, trasactions, uncles)
498502
if err != nil {
499503
glog.V(logger.Debug).Infoln(err)

0 commit comments

Comments
 (0)