Cancel pending downloader tasks before rewinding

This commit is contained in:
Jerry 2024-05-02 12:08:53 -07:00 committed by Anshal Shukla
parent 7c729f542b
commit 3c284fa8af
No known key found for this signature in database
GPG key ID: 84BE5474523D8CBC

View file

@ -162,6 +162,7 @@ func rewindBack(eth *Ethereum, head uint64, rewindTo uint64) {
} }
func rewind(eth *Ethereum, head uint64, rewindTo uint64) { func rewind(eth *Ethereum, head uint64, rewindTo uint64) {
eth.handler.downloader.Cancel()
err := eth.blockchain.SetHead(rewindTo) err := eth.blockchain.SetHead(rewindTo)
if err != nil { if err != nil {