Browse Source

rename methods for clarity

pull/1574/head
Anton Kaliaev 7 years ago
parent
commit
b77d5344fc
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      consensus/reactor.go

+ 4
- 4
consensus/reactor.go View File

@ -360,11 +360,11 @@ func (conR *ConsensusReactor) startBroadcastRoutine() error {
for {
select {
case rs := <-rchs.newRoundSteps:
conR.broadcastNewRoundStepMessage(rs)
conR.broadcastNewRoundStepMessages(rs)
case vote := <-rchs.votes:
conR.broadcastHasVoteMessage(vote)
case heartbeat := <-rchs.proposalHeartbeats:
conR.broadcastProposalHeartbeat(heartbeat)
conR.broadcastProposalHeartbeatMessage(heartbeat)
case <-conR.Quit():
return
}
@ -374,14 +374,14 @@ func (conR *ConsensusReactor) startBroadcastRoutine() error {
return nil
}
func (conR *ConsensusReactor) broadcastProposalHeartbeat(hb *types.Heartbeat) {
func (conR *ConsensusReactor) broadcastProposalHeartbeatMessage(hb *types.Heartbeat) {
conR.Logger.Debug("Broadcasting proposal heartbeat message",
"height", hb.Height, "round", hb.Round, "sequence", hb.Sequence)
msg := &ProposalHeartbeatMessage{hb}
conR.Switch.Broadcast(StateChannel, cdc.MustMarshalBinaryBare(msg))
}
func (conR *ConsensusReactor) broadcastNewRoundStepMessage(rs *cstypes.RoundState) {
func (conR *ConsensusReactor) broadcastNewRoundStepMessages(rs *cstypes.RoundState) {
nrsMsg, csMsg := makeRoundStepMessages(rs)
if nrsMsg != nil {
conR.Switch.Broadcast(StateChannel, cdc.MustMarshalBinaryBare(nrsMsg))


Loading…
Cancel
Save