diff --git a/config/flags.go b/config/flags.go index 254d70fea2dd..67fe339db887 100644 --- a/config/flags.go +++ b/config/flags.go @@ -204,8 +204,8 @@ func addNodeFlags(fs *pflag.FlagSet) { fs.Uint64(OutboundThrottlerNodeMaxAtLargeBytesKey, constants.DefaultOutboundThrottlerNodeMaxAtLargeBytes, "Max number of bytes a node can take from the outbound message throttler's at-large allocation. Must be at least the max message size") // HTTP APIs - fs.String(HTTPHostKey, "127.0.0.1", "Address of the HTTP server") - fs.Uint(HTTPPortKey, DefaultHTTPPort, "Port of the HTTP server") + fs.String(HTTPHostKey, "127.0.0.1", "Address of the HTTP server. If the address is empty or a literal unspecified IP address, the server will bind on all available unicast and anycast IP addresses of the local system") + fs.Uint(HTTPPortKey, DefaultHTTPPort, "Port of the HTTP server. If the port is 0 a port number is automatically chosen") fs.Bool(HTTPSEnabledKey, false, "Upgrade the HTTP server to HTTPs") fs.String(HTTPSKeyFileKey, "", fmt.Sprintf("TLS private key file for the HTTPs server. Ignored if %s is specified", HTTPSKeyContentKey)) fs.String(HTTPSKeyContentKey, "", "Specifies base64 encoded TLS private key for the HTTPs server") @@ -248,8 +248,8 @@ func addNodeFlags(fs *pflag.FlagSet) { fs.Duration(NetworkHealthMaxOutstandingDurationKey, 5*time.Minute, "Node reports unhealthy if there has been a request outstanding for this duration") // Staking - fs.String(StakingHostKey, "", "Address of the consensus server") // Bind to all interfaces by default. - fs.Uint(StakingPortKey, DefaultStakingPort, "Port of the consensus server") + fs.String(StakingHostKey, "", "Address of the consensus server. If the address is empty or a literal unspecified IP address, the server will bind on all available unicast and anycast IP addresses of the local system") // Bind to all interfaces by default. + fs.Uint(StakingPortKey, DefaultStakingPort, "Port of the consensus server. If the port is 0 a port number is automatically chosen") fs.Bool(StakingEphemeralCertEnabledKey, false, "If true, the node uses an ephemeral staking TLS key and certificate, and has an ephemeral node ID") fs.String(StakingTLSKeyPathKey, defaultStakingTLSKeyPath, fmt.Sprintf("Path to the TLS private key for staking. Ignored if %s is specified", StakingTLSKeyContentKey)) fs.String(StakingTLSKeyContentKey, "", "Specifies base64 encoded TLS private key for staking") diff --git a/network/p2p/handler.go b/network/p2p/handler.go index 9212864e5436..790893142087 100644 --- a/network/p2p/handler.go +++ b/network/p2p/handler.go @@ -111,9 +111,8 @@ func (r *responder) AppRequest(ctx context.Context, nodeID ids.NodeID, requestID return r.sender.SendAppResponse(ctx, nodeID, requestID, appResponse) } -func (r *responder) AppGossip(ctx context.Context, nodeID ids.NodeID, msg []byte) error { - err := r.handler.AppGossip(ctx, nodeID, msg) - if err != nil { +func (r *responder) AppGossip(ctx context.Context, nodeID ids.NodeID, msg []byte) { + if err := r.handler.AppGossip(ctx, nodeID, msg); err != nil { r.log.Debug("failed to handle message", zap.Stringer("messageOp", message.AppGossipOp), zap.Stringer("nodeID", nodeID), @@ -121,7 +120,6 @@ func (r *responder) AppGossip(ctx context.Context, nodeID ids.NodeID, msg []byte zap.Binary("message", msg), ) } - return nil } func (r *responder) CrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, deadline time.Time, request []byte) error { diff --git a/network/p2p/router.go b/network/p2p/router.go index bd1f334cda7c..1da66a7d2d4e 100644 --- a/network/p2p/router.go +++ b/network/p2p/router.go @@ -256,9 +256,7 @@ func (r *Router) AppGossip(ctx context.Context, nodeID ids.NodeID, gossip []byte return nil } - if err := handler.AppGossip(ctx, nodeID, parsedMsg); err != nil { - return err - } + handler.AppGossip(ctx, nodeID, parsedMsg) handler.metrics.appGossipTime.Observe(float64(time.Since(start))) return nil