nit: fix error log consensus:marshaling error: json: unsupported type: chan []uint8

pull/1541/head
Dennis Won 5 years ago
parent 9f4e6a7e9e
commit 14a44d8f2c
  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)
numOfTxs := len(block.Transactions())
tps := float64(numOfTxs) / timeElapsed.Seconds()
utils.Logger().Info().
consensus.getLogger().Info().
Int("numOfTXs", numOfTxs).
Time("startTime", startTime).
Time("endTime", endTime).
Dur("timeElapsed", endTime.Sub(startTime)).
Float64("TPS", tps).
Interface("consensus", consensus).
Msg("TPS Report")
// Post metrics

@ -33,7 +33,7 @@ func (consensus *Consensus) handleMessageUpdate(payload []byte) {
msg := &msg_pb.Message{}
err := protobuf.Unmarshal(payload, msg)
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
}
@ -1161,7 +1161,6 @@ func (consensus *Consensus) Start(blockChannel chan *types.Block, stopChan chan
consensus.getLogger().Debug().
Int("numTxs", len(newBlock.Transactions())).
Interface("consensus", consensus).
Time("startTime", startTime).
Int("publicKeys", len(consensus.PublicKeys)).
Msg("[ConsensusMainLoop] STARTING CONSENSUS")

Loading…
Cancel
Save