Skip to content

Commit

Permalink
Fix listen and advertise-address command line options
Browse files Browse the repository at this point in the history
Allow multiple values
  • Loading branch information
ivan4th committed Nov 17, 2023
1 parent 9e96cb9 commit 84d9354
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ func AddCommands(cmd *cobra.Command) {

/** ======================== P2P Flags ========================== **/

cmd.PersistentFlags().StringVar(&cfg.P2P.Listen, "listen",
cfg.P2P.Listen, "address for listening")
cmd.PersistentFlags().StringSliceVar(&cfg.P2P.ListenAddresses, "listen",
cfg.P2P.ListenAddresses, "address for listening")
cmd.PersistentFlags().BoolVar(&cfg.P2P.Flood, "flood",
cfg.P2P.Flood, "flood created messages to all peers")
cmd.PersistentFlags().BoolVar(&cfg.P2P.DisableNatPort, "disable-natport", cfg.P2P.DisableNatPort,
Expand Down Expand Up @@ -114,8 +114,8 @@ func AddCommands(cmd *cobra.Command) {
cfg.P2P.MinPeers, "actively search for peers until you get this much")
cmd.PersistentFlags().StringSliceVar(&cfg.P2P.Bootnodes, "bootnodes",
cfg.P2P.Bootnodes, "entrypoints into the network")
cmd.PersistentFlags().StringVar(&cfg.P2P.AdvertiseAddress, "advertise-address",
cfg.P2P.AdvertiseAddress, "libp2p address with identity (example: /dns4/bootnode.spacemesh.io/tcp/5003)")
cmd.PersistentFlags().StringSliceVar(&cfg.P2P.AdvertiseAddresses, "advertise-address",
cfg.P2P.AdvertiseAddresses, "libp2p address(es) with identity (example: /dns4/bootnode.spacemesh.io/tcp/5003)")
cmd.PersistentFlags().BoolVar(&cfg.P2P.Bootnode, "p2p-bootnode", cfg.P2P.Bootnode,
"gossipsub and discovery will be running in a mode suitable for bootnode")
cmd.PersistentFlags().BoolVar(&cfg.P2P.PrivateNetwork, "p2p-private-network", cfg.P2P.PrivateNetwork,
Expand Down

0 comments on commit 84d9354

Please sign in to comment.