Browse Source

consensus: minor cosmetic

pull/1133/head
Ethan Buchman 7 years ago
parent
commit
87087b8acd
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      consensus/state.go

+ 5
- 4
consensus/state.go View File

@ -86,7 +86,7 @@ type ConsensusState struct {
cstypes.RoundState
state sm.State // State until height-1.
// state changes may be triggered by msgs from peers,
// state changes may be triggered by: msgs from peers,
// msgs from ourself, or by timeouts
peerMsgQueue chan msgInfo
internalMsgQueue chan msgInfo
@ -771,11 +771,12 @@ func (cs *ConsensusState) enterPropose(height int64, round int) {
return
}
if cs.Validators.HasAddress(cs.privValidator.GetAddress()) {
cs.Logger.Debug("This node is a validator")
} else {
// if not a validator, we're done
if !cs.Validators.HasAddress(cs.privValidator.GetAddress()) {
cs.Logger.Debug("This node is not a validator")
return
}
cs.Logger.Debug("This node is a validator")
if cs.isProposer() {
cs.Logger.Info("enterPropose: Our turn to propose", "proposer", cs.Validators.GetProposer().Address, "privValidator", cs.privValidator)


Loading…
Cancel
Save