Skip to content

Commit

Permalink
cmd/utils, eth/downloader: minor snap nitpicks
Browse files Browse the repository at this point in the history
  • Loading branch information
karalabe authored and mandrigin committed Mar 9, 2021
1 parent 18852aa commit a50f261
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1526,7 +1526,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
// If snap-sync is requested, this flag is also required
if cfg.SyncMode == downloader.SnapSync {
log.Info("Snap sync requested, enabling --snapshot")
ctx.Set(SnapshotFlag.Name, "true")
} else {
cfg.TrieCleanCache += cfg.SnapshotCache
cfg.SnapshotCache = 0 // Disabled
Expand Down
4 changes: 2 additions & 2 deletions eth/downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ var (
errCancelContentProcessing = errors.New("content processing canceled (requested)")
errCanceled = errors.New("syncing canceled (requested)")
errNoSyncActive = errors.New("no sync active")
errTooOld = errors.New("peer doesn't speak recent enough protocol version (need version >= 64)")
errTooOld = errors.New("peer's protocol version too old")
)

type Downloader struct {
Expand Down Expand Up @@ -502,7 +502,7 @@ func (d *Downloader) syncWithPeer(p *peerConnection, hash common.Hash, blockNumb
}
}()
if p.version < 64 {
return fmt.Errorf("%w, peer version: %d", errTooOld, p.version)
return fmt.Errorf("%w: advertized %d < required %d", errTooOld, p.version, 64)
}
mode := d.getMode()

Expand Down

0 comments on commit a50f261

Please sign in to comment.