Skip to content

Commit

Permalink
cmd/utils: update for cli/v2
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl committed Jun 28, 2022
1 parent a503a6c commit ff45c0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1128,8 +1128,8 @@ func setListenAddress(ctx *cli.Context, cfg *p2p.Config) {
if ctx.IsSet(ListenPortFlag.Name) {
cfg.ListenAddr = fmt.Sprintf(":%d", ctx.Int(ListenPortFlag.Name))
}
if ctx.GlobalIsSet(DiscPortFlag.Name) {
cfg.DiscAddr = fmt.Sprintf(":%d", ctx.GlobalInt(DiscPortFlag.Name))
if ctx.IsSet(DiscPortFlag.Name) {
cfg.DiscAddr = fmt.Sprintf(":%d", ctx.Int(DiscPortFlag.Name))
}
}

Expand Down

0 comments on commit ff45c0d

Please sign in to comment.