mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
eth/downloader: remove unused error
This commit is contained in:
parent
a0a44a6b46
commit
5b5023516c
1 changed files with 4 additions and 5 deletions
|
|
@ -67,7 +67,6 @@ var (
|
|||
errCancelContentProcessing = errors.New("content processing canceled (requested)")
|
||||
errCanceled = errors.New("syncing canceled (requested)")
|
||||
errNoPivotHeader = errors.New("pivot header is not found")
|
||||
ErrMergeTransition = errors.New("legacy sync reached the merge")
|
||||
)
|
||||
|
||||
// peerDropFn is a callback type for dropping a peer detected as malicious.
|
||||
|
|
@ -230,13 +229,13 @@ func (d *Downloader) Progress() ethereum.SyncProgress {
|
|||
|
||||
current := uint64(0)
|
||||
mode := d.getMode()
|
||||
switch {
|
||||
case d.blockchain != nil && mode == FullSync:
|
||||
switch mode {
|
||||
case FullSync:
|
||||
current = d.blockchain.CurrentBlock().Number.Uint64()
|
||||
case d.blockchain != nil && mode == SnapSync:
|
||||
case SnapSync:
|
||||
current = d.blockchain.CurrentSnapBlock().Number.Uint64()
|
||||
default:
|
||||
log.Error("Unknown downloader chain/mode combo", "full", d.blockchain != nil, "mode", mode)
|
||||
log.Error("Unknown downloader mode", "mode", mode)
|
||||
}
|
||||
progress, pending := d.SnapSyncer.Progress()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue