mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
eth/downloader/downloader.go : potential panic
This commit is contained in:
parent
bdf5e388ca
commit
d4672ea2f8
1 changed files with 4 additions and 0 deletions
|
|
@ -1614,6 +1614,10 @@ func (d *Downloader) processSnapSyncContent() error {
|
||||||
}
|
}
|
||||||
// Split around the pivot block and process the two sides via snap/full sync
|
// Split around the pivot block and process the two sides via snap/full sync
|
||||||
if !d.committed.Load() {
|
if !d.committed.Load() {
|
||||||
|
if len(results) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
latest := results[len(results)-1].Header
|
latest := results[len(results)-1].Header
|
||||||
// If the height is above the pivot block by 2 sets, it means the pivot
|
// If the height is above the pivot block by 2 sets, it means the pivot
|
||||||
// become stale in the network, and it was garbage collected, move to a
|
// become stale in the network, and it was garbage collected, move to a
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue