Skip to content

Commit 4ca35d7

Browse files
committed
fix lint
1 parent d8bc99b commit 4ca35d7

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

prl/downloader/downloader.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ var (
7878
errCanceled = errors.New("syncing canceled (requested)")
7979
errTooOld = errors.New("peer's protocol version too old")
8080
errNoAncestorFound = errors.New("no common ancestor found")
81-
errNoPivotHeader = errors.New("pivot header is not found")
8281
)
8382

8483
// peerDropFn is a callback type for dropping a peer detected as malicious.
@@ -1619,25 +1618,3 @@ func (d *Downloader) DeliverSnapPacket(peer *snap.Peer, packet snap.Packet) erro
16191618
return fmt.Errorf("unexpected snap packet type: %T", packet)
16201619
}
16211620
}
1622-
1623-
// readHeaderRange returns a list of headers, using the given last header as the base,
1624-
// and going backwards towards genesis. This method assumes that the caller already has
1625-
// placed a reasonable cap on count.
1626-
func (d *Downloader) readHeaderRange(last *types.Header, count int) []*types.Header {
1627-
var (
1628-
current = last
1629-
headers []*types.Header
1630-
)
1631-
for {
1632-
parent := d.lightchain.GetHeaderByHash(current.ParentHash)
1633-
if parent == nil {
1634-
break // The chain is not continuous, or the chain is exhausted
1635-
}
1636-
headers = append(headers, parent)
1637-
if len(headers) >= count {
1638-
break
1639-
}
1640-
current = parent
1641-
}
1642-
return headers
1643-
}

prl/sync.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ type chainSyncer struct {
6565
handler *handler
6666
force *time.Timer
6767
forced bool // true when force timer fired
68-
warned time.Time
6968
peerEventCh chan struct{}
7069
doneCh chan error // non-nil when sync is running
7170
}

0 commit comments

Comments
 (0)