Skip to content

Commit 5185053

Browse files
committed
cmd/utils: flags should not be setted to true directly
1 parent da3822d commit 5185053

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/utils/flags.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@ func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config) {
13681368
cfg.MaxPendingPeers = ctx.Int(MaxPendingPeersFlag.Name)
13691369
}
13701370
if ctx.IsSet(NoDiscoverFlag.Name) {
1371-
cfg.NoDiscovery = true
1371+
cfg.NoDiscovery = ctx.Bool(NoDiscoverFlag.Name)
13721372
}
13731373

13741374
flags.CheckExclusive(ctx, DiscoveryV4Flag, NoDiscoverFlag)
@@ -1718,7 +1718,7 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
17181718
cfg.LogHistory = ctx.Uint64(LogHistoryFlag.Name)
17191719
}
17201720
if ctx.IsSet(LogNoHistoryFlag.Name) {
1721-
cfg.LogNoHistory = true
1721+
cfg.LogNoHistory = ctx.Bool(LogNoHistoryFlag.Name)
17221722
}
17231723
if ctx.IsSet(LogExportCheckpointsFlag.Name) {
17241724
cfg.LogExportCheckpoints = ctx.String(LogExportCheckpointsFlag.Name)

0 commit comments

Comments
 (0)