Merge branch 'master' of github.com:harmony-one/harmony into verify_headers

pull/1539/head
Dennis Won 5 years ago
commit c48f3bdbbe
  1. 3
      consensus/consensus_service.go
  2. 3
      consensus/consensus_v2.go

@ -412,13 +412,12 @@ func (consensus *Consensus) reportMetrics(block types.Block) {
timeElapsed := endTime.Sub(startTime) timeElapsed := endTime.Sub(startTime)
numOfTxs := len(block.Transactions()) numOfTxs := len(block.Transactions())
tps := float64(numOfTxs) / timeElapsed.Seconds() tps := float64(numOfTxs) / timeElapsed.Seconds()
utils.Logger().Info(). consensus.getLogger().Info().
Int("numOfTXs", numOfTxs). Int("numOfTXs", numOfTxs).
Time("startTime", startTime). Time("startTime", startTime).
Time("endTime", endTime). Time("endTime", endTime).
Dur("timeElapsed", endTime.Sub(startTime)). Dur("timeElapsed", endTime.Sub(startTime)).
Float64("TPS", tps). Float64("TPS", tps).
Interface("consensus", consensus).
Msg("TPS Report") Msg("TPS Report")
// Post metrics // Post metrics

@ -33,7 +33,7 @@ func (consensus *Consensus) handleMessageUpdate(payload []byte) {
msg := &msg_pb.Message{} msg := &msg_pb.Message{}
err := protobuf.Unmarshal(payload, msg) err := protobuf.Unmarshal(payload, msg)
if err != nil { if err != nil {
utils.Logger().Error().Err(err).Interface("consensus", consensus).Msg("Failed to unmarshal message payload.") consensus.getLogger().Error().Err(err).Msg("Failed to unmarshal message payload.")
return return
} }
@ -1161,7 +1161,6 @@ func (consensus *Consensus) Start(blockChannel chan *types.Block, stopChan chan
consensus.getLogger().Debug(). consensus.getLogger().Debug().
Int("numTxs", len(newBlock.Transactions())). Int("numTxs", len(newBlock.Transactions())).
Interface("consensus", consensus).
Time("startTime", startTime). Time("startTime", startTime).
Int("publicKeys", len(consensus.PublicKeys)). Int("publicKeys", len(consensus.PublicKeys)).
Msg("[ConsensusMainLoop] STARTING CONSENSUS") Msg("[ConsensusMainLoop] STARTING CONSENSUS")

Loading…
Cancel
Save