Commit d45f01d5 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke

Merge pull request #2285 from karalabe/forward-empty-bodies

eth: forward empty body responses to the downlaoder
parents 41f35d79 ae4982a3
...@@ -493,7 +493,11 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { ...@@ -493,7 +493,11 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
uncles[i] = body.Uncles uncles[i] = body.Uncles
} }
// Filter out any explicitly requested bodies, deliver the rest to the downloader // 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) err := pm.downloader.DeliverBodies(p.id, trasactions, uncles)
if err != nil { if err != nil {
glog.V(logger.Debug).Infoln(err) glog.V(logger.Debug).Infoln(err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment