mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-26 15:22:15 +00:00
broadcast on newStepCh on switch to consensus reactor
This commit is contained in:
parent
84c3fd9a85
commit
ff87958f95
@ -203,7 +203,7 @@ FOR_LOOP:
|
|||||||
maxPending := bcR.pool.numPending == maxPendingRequests
|
maxPending := bcR.pool.numPending == maxPendingRequests
|
||||||
maxPeerless := bcR.pool.peerless == bcR.pool.numPending
|
maxPeerless := bcR.pool.peerless == bcR.pool.numPending
|
||||||
o, i, _ := bcR.sw.NumPeers()
|
o, i, _ := bcR.sw.NumPeers()
|
||||||
enoughPeers := o+i > 5
|
enoughPeers := o+i >= 5
|
||||||
if maxPending && maxPeerless && enoughPeers {
|
if maxPending && maxPeerless && enoughPeers {
|
||||||
log.Warn("Time to switch to consensus reactor!", "height", bcR.pool.height)
|
log.Warn("Time to switch to consensus reactor!", "height", bcR.pool.height)
|
||||||
bcR.pool.Stop()
|
bcR.pool.Stop()
|
||||||
|
@ -245,6 +245,7 @@ func (conR *ConsensusReactor) SetPrivValidator(priv *sm.PrivValidator) {
|
|||||||
// Reset to some state.
|
// Reset to some state.
|
||||||
func (conR *ConsensusReactor) ResetToState(state *sm.State) {
|
func (conR *ConsensusReactor) ResetToState(state *sm.State) {
|
||||||
conR.conS.updateToState(state, false)
|
conR.conS.updateToState(state, false)
|
||||||
|
conR.conS.newStepCh <- conR.conS.getRoundState()
|
||||||
}
|
}
|
||||||
|
|
||||||
// implements events.Eventable
|
// implements events.Eventable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user