logging: shorten precommit log message (#6270)

This is an attempt to clean up the logging message as requested in #6269.
This commit is contained in:
Sam Kleinman
2021-03-25 16:26:56 +00:00
committed by GitHub
parent 7d53cb232c
commit 3f9066b290
3 changed files with 24 additions and 4 deletions
+6 -1
View File
@@ -2128,7 +2128,12 @@ func (cs *State) addVote(vote *types.Vote, peerID p2p.NodeID) (added bool, err e
case tmproto.PrecommitType:
precommits := cs.Votes.Precommits(vote.Round)
cs.Logger.Debug("added vote to precommit", "vote", vote, "precommits", precommits.StringShort())
cs.Logger.Debug("added vote to precommit",
"height", vote.Height,
"round", vote.Round,
"validator", vote.ValidatorAddress.String(),
"vote_timestamp", vote.Timestamp,
"data", precommits.LogString())
blockID, ok := precommits.TwoThirdsMajority()
if ok {