Skip to content

Commit 8cabfbf

Browse files
eth/downloader: log instead of panic in beaconsync
1 parent 6026e1f commit 8cabfbf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

eth/downloader/beaconsync.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ func (d *Downloader) findBeaconAncestor() uint64 {
159159
check := (start + end) / 2
160160

161161
h := d.skeleton.Header(check)
162+
if h == nil {
163+
log.Warn("Header not found in skeleton", "check", check, "head", number)
164+
return 0
165+
}
162166
n := h.Number.Uint64()
163167

164168
var known bool

0 commit comments

Comments
 (0)