adress review feedback

pull/2938/head
Jian Zhen 5 years ago committed by Leo Chen
parent 4f86f40dc2
commit 028631e1cb
  1. 4
      node/node_handler.go
  2. 2
      p2p/host.go

@ -64,7 +64,7 @@ func (node *Node) HandleMessage(content []byte, sender libp2p_peer.ID) {
utils.Logger().Info().
Int64("TotalIn", node.host.GetBandwidthTotals().TotalIn).
Float64("RateIn", node.host.GetBandwidthTotals().RateIn).
Msg("Record Receiving Metrics!")
Msg("[metrics][p2p] traffic in in bytes")
msgCategory, err := proto.GetMessageCategory(content)
if err != nil {
@ -457,7 +457,7 @@ func (node *Node) PostConsensusProcessing(
// Clear metrics after one consensus cycle
node.host.ResetMetrics()
utils.Logger().Info().Msg("Metrics cleared after one consensus cycle")
utils.Logger().Info().Msg("[metrics][p2p] Reset after 1 consensus cycle")
// Update consensus keys at last so the change of leader status doesn't mess up normal flow
if len(newBlock.Header().ShardState()) > 0 {

@ -180,7 +180,7 @@ func (host *HostV2) SendMessageToGroups(groups []nodeconfig.GroupID, msg []byte)
host.logger.Info().
Int64("TotalOut", host.GetBandwidthTotals().TotalOut).
Float64("RateOut", host.GetBandwidthTotals().RateOut).
Msg("Record Sending Metrics!")
Msg("[metrics][p2p] traffic out in bytes")
return err
}

Loading…
Cancel
Save