[release/1.4.11] eth, eth/downloader: don't forward the DAO challenge header

(cherry picked from commit 071af57bcf)
This commit is contained in:
Péter Szilágyi 2016-07-26 12:26:41 +03:00 committed by Jeffrey Wilcke
parent 48709d5340
commit 6c672a55c0
2 changed files with 2 additions and 1 deletions

View File

@ -542,7 +542,7 @@ func (d *Downloader) fetchHeight(p *peer) (*types.Header, error) {
// In the rare scenario when we ended up on a long reorganisation (i.e. none of // In the rare scenario when we ended up on a long reorganisation (i.e. none of
// the head links match), we do a binary search to find the common ancestor. // the head links match), we do a binary search to find the common ancestor.
func (d *Downloader) findAncestor(p *peer, height uint64) (uint64, error) { func (d *Downloader) findAncestor(p *peer, height uint64) (uint64, error) {
glog.V(logger.Debug).Infof("%v: looking for common ancestor", p) glog.V(logger.Debug).Infof("%v: looking for common ancestor (remote height %d)", p, height)
// Figure out the valid ancestor range to prevent rewrite attacks // Figure out the valid ancestor range to prevent rewrite attacks
floor, ceil := int64(-1), d.headHeader().Number.Uint64() floor, ceil := int64(-1), d.headHeader().Number.Uint64()

View File

@ -434,6 +434,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
return err return err
} }
glog.V(logger.Debug).Infof("%v: verified to be on the same side of the DAO fork", p) glog.V(logger.Debug).Infof("%v: verified to be on the same side of the DAO fork", p)
return nil
} }
// Irrelevant of the fork checks, send the header to the fetcher just in case // Irrelevant of the fork checks, send the header to the fetcher just in case
headers = pm.fetcher.FilterHeaders(headers, time.Now()) headers = pm.fetcher.FilterHeaders(headers, time.Now())