Commit 335ef569 authored by caopingcp's avatar caopingcp Committed by 33cn

fix tendermint p2p panic

parent c4e849fb
......@@ -423,6 +423,10 @@ func (pc *peerConn) PickSendVote(votes ttypes.VoteSetReader) bool {
}
}
if vote, ok := pc.state.PickVoteToSend(votes); ok {
if vote == nil {
tendermintlog.Warn("Pick nil vote", "aggVote", votes.GetAggVote(), "vote", votes)
return false
}
msg := MsgInfo{TypeID: ttypes.VoteID, Msg: vote.Vote, PeerID: pc.id, PeerIP: pc.ip.String()}
tendermintlog.Debug("Sending vote message", "msg", msg)
if pc.Send(msg) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment