diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index e7dac8e4ce..dd1bf0e519 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1921,6 +1921,11 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { if cfg.TriesVerifyMode.NeedRemoteVerify() { cfg.EnableTrustProtocol = true } + // A node without trie is not able to provide snap data, so it should disable snap protocol. + if cfg.TriesVerifyMode != core.LocalVerify { + log.Info("Automatically disables snap protocol due to verify mode", "mode", cfg.TriesVerifyMode) + cfg.DisableSnapProtocol = true + } } if ctx.IsSet(CacheFlag.Name) || ctx.IsSet(CacheSnapshotFlag.Name) { cfg.SnapshotCache = ctx.Int(CacheFlag.Name) * ctx.Int(CacheSnapshotFlag.Name) / 100