From 83d317cff937940395fcb7ece29effc9c7779c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Wed, 6 Jan 2021 08:37:45 +0200 Subject: [PATCH] cmd/utils, eth/downloader: minor snap nitpicks --- cmd/utils/flags.go | 1 - eth/downloader/downloader.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 764d7ad73..684e3428b 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1568,7 +1568,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 diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 312359843..315354ea9 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -89,7 +89,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 { @@ -460,7 +460,7 @@ func (d *Downloader) syncWithPeer(p *peerConnection, hash common.Hash, td *big.I } }() 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()