core, eth/downloader: fix resetting below freezer threshold

This commit is contained in:
Péter Szilágyi
2021-11-22 11:11:59 +02:00
parent 6f2c3f2114
commit d9c13d407f
2 changed files with 9 additions and 9 deletions

View File

@ -535,7 +535,7 @@ func (d *Downloader) syncWithPeer(p *peerConnection, hash common.Hash, td *big.I
}
// Rewind the ancient store and blockchain if reorg happens.
if origin+1 < frozen {
if err := d.lightchain.SetHead(origin + 1); err != nil {
if err := d.lightchain.SetHead(origin); err != nil {
return err
}
}