[release/1.3.5] eth: forward empty body responses to the downlaoder

(cherry picked from commit ae4982a365)
pull/29975/head
Péter Szilágyi 9 years ago committed by Jeffrey Wilcke
parent d3f8b763bf
commit 869d9792b3
  1. 6
      eth/handler.go

@ -491,7 +491,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)

Loading…
Cancel
Save