mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-31 12:11:58 +00:00
start peer before AddPeer() on reactors.
This commit is contained in:
@@ -225,8 +225,8 @@ func (conR *ConsensusReactor) SetPrivValidator(priv *sm.PrivValidator) {
|
|||||||
conR.conS.SetPrivValidator(priv)
|
conR.conS.SetPrivValidator(priv)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fast forward to some state.
|
// Reset to some state.
|
||||||
func (conR *ConsensusReactor) UpdateToState(state *sm.State) {
|
func (conR *ConsensusReactor) ResetToState(state *sm.State) {
|
||||||
conR.conS.updateToState(state, false)
|
conR.conS.updateToState(state, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -131,12 +131,12 @@ func (sw *Switch) AddPeerWithConnection(conn net.Conn, outbound bool) (*Peer, er
|
|||||||
return nil, ErrSwitchDuplicatePeer
|
return nil, ErrSwitchDuplicatePeer
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify listeners.
|
|
||||||
sw.doAddPeer(peer)
|
|
||||||
|
|
||||||
// Start the peer
|
// Start the peer
|
||||||
go peer.start()
|
go peer.start()
|
||||||
|
|
||||||
|
// Notify listeners.
|
||||||
|
sw.doAddPeer(peer)
|
||||||
|
|
||||||
// Send handshake
|
// Send handshake
|
||||||
msg := &pexHandshakeMessage{Network: sw.network}
|
msg := &pexHandshakeMessage{Network: sw.network}
|
||||||
peer.Send(PexChannel, msg)
|
peer.Send(PexChannel, msg)
|
||||||
|
Reference in New Issue
Block a user