Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into remove-db-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Laine committed Oct 31, 2023
2 parents 3987bf5 + 8d15c22 commit a8f1fe1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
8 changes: 4 additions & 4 deletions config/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down
6 changes: 2 additions & 4 deletions network/p2p/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,15 @@ 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),
zap.Uint64("handlerID", r.handlerID),
zap.Binary("message", msg),
)
}
return nil
}

func (r *responder) CrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, deadline time.Time, request []byte) error {
Expand Down
4 changes: 1 addition & 3 deletions network/p2p/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a8f1fe1

Please sign in to comment.