From c9e11de2a7f6dc325664b5245e070c94452f16b4 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Thu, 10 Aug 2017 00:12:16 -0400 Subject: [PATCH] consensus: log ProposalHeartbeat msg --- consensus/reactor.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/consensus/reactor.go b/consensus/reactor.go index 222339241..72d731aca 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -211,6 +211,11 @@ func (conR *ConsensusReactor) Receive(chID byte, src *p2p.Peer, msgBytes []byte) BlockID: msg.BlockID, Votes: ourVotes, }}) + case *ProposalHeartbeatMessage: + hb := msg.Heartbeat + conR.Logger.Debug("Received proposal heartbeat message", + "height", hb.Height, "round", hb.Round, "sequence", hb.Sequence, + "valIdx", hb.ValidatorIndex, "valAddr", hb.ValidatorAddress) default: conR.Logger.Error(cmn.Fmt("Unknown message type %v", reflect.TypeOf(msg))) } @@ -332,7 +337,10 @@ func (conR *ConsensusReactor) registerEventCallbacks() { } func (conR *ConsensusReactor) broadcastProposalHeartbeatMessage(heartbeat types.EventDataProposalHeartbeat) { - msg := &ProposalHeartbeatMessage{heartbeat.Heartbeat} + hb := heartbeat.Heartbeat + conR.Logger.Debug("Broadcasting proposal heartbeat message", + "height", hb.Height, "round", hb.Round, "sequence", hb.Sequence) + msg := &ProposalHeartbeatMessage{hb} conR.Switch.Broadcast(StateChannel, struct{ ConsensusMessage }{msg}) }