mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 14:52:17 +00:00
remove warning messages in favor of "Send failed"
This commit is contained in:
parent
6dbe9febce
commit
2c724d5eee
@ -118,7 +118,6 @@ func (bcR *BlockchainReactor) GetChannels() []*p2p.ChannelDescriptor {
|
|||||||
// AddPeer implements Reactor by sending our state to peer.
|
// AddPeer implements Reactor by sending our state to peer.
|
||||||
func (bcR *BlockchainReactor) AddPeer(peer *p2p.Peer) {
|
func (bcR *BlockchainReactor) AddPeer(peer *p2p.Peer) {
|
||||||
if !peer.Send(BlockchainChannel, struct{ BlockchainMessage }{&bcStatusResponseMessage{bcR.store.Height()}}) {
|
if !peer.Send(BlockchainChannel, struct{ BlockchainMessage }{&bcStatusResponseMessage{bcR.store.Height()}}) {
|
||||||
log.Warn("Failed to send our state to peer", "peer", peer)
|
|
||||||
// doing nothing, will try later in `poolRoutine`
|
// doing nothing, will try later in `poolRoutine`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -365,19 +365,13 @@ func makeRoundStepMessages(rs *RoundState) (nrsMsg *NewRoundStepMessage, csMsg *
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (conR *ConsensusReactor) sendNewRoundStepMessages(peer *p2p.Peer) {
|
func (conR *ConsensusReactor) sendNewRoundStepMessages(peer *p2p.Peer) {
|
||||||
log := log.New("peer", peer)
|
|
||||||
|
|
||||||
rs := conR.conS.GetRoundState()
|
rs := conR.conS.GetRoundState()
|
||||||
nrsMsg, csMsg := makeRoundStepMessages(rs)
|
nrsMsg, csMsg := makeRoundStepMessages(rs)
|
||||||
if nrsMsg != nil {
|
if nrsMsg != nil {
|
||||||
if !peer.Send(StateChannel, struct{ ConsensusMessage }{nrsMsg}) {
|
peer.Send(StateChannel, struct{ ConsensusMessage }{nrsMsg})
|
||||||
log.Warn("Failed to send NewRoundStepMessage to peer")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if csMsg != nil {
|
if csMsg != nil {
|
||||||
if !peer.Send(StateChannel, struct{ ConsensusMessage }{csMsg}) {
|
peer.Send(StateChannel, struct{ ConsensusMessage }{csMsg})
|
||||||
log.Warn("Failed to send RoundStepCommit to peer")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -406,8 +400,6 @@ OUTER_LOOP:
|
|||||||
}
|
}
|
||||||
if peer.Send(DataChannel, struct{ ConsensusMessage }{msg}) {
|
if peer.Send(DataChannel, struct{ ConsensusMessage }{msg}) {
|
||||||
ps.SetHasProposalBlockPart(prs.Height, prs.Round, index)
|
ps.SetHasProposalBlockPart(prs.Height, prs.Round, index)
|
||||||
} else {
|
|
||||||
log.Warn("Failed to send BlockPartMessage to peer")
|
|
||||||
}
|
}
|
||||||
continue OUTER_LOOP
|
continue OUTER_LOOP
|
||||||
}
|
}
|
||||||
@ -445,8 +437,6 @@ OUTER_LOOP:
|
|||||||
}
|
}
|
||||||
if peer.Send(DataChannel, struct{ ConsensusMessage }{msg}) {
|
if peer.Send(DataChannel, struct{ ConsensusMessage }{msg}) {
|
||||||
ps.SetHasProposalBlockPart(prs.Height, prs.Round, index)
|
ps.SetHasProposalBlockPart(prs.Height, prs.Round, index)
|
||||||
} else {
|
|
||||||
log.Warn("Failed to send BlockPartMessage to peer")
|
|
||||||
}
|
}
|
||||||
continue OUTER_LOOP
|
continue OUTER_LOOP
|
||||||
} else {
|
} else {
|
||||||
@ -475,8 +465,6 @@ OUTER_LOOP:
|
|||||||
msg := &ProposalMessage{Proposal: rs.Proposal}
|
msg := &ProposalMessage{Proposal: rs.Proposal}
|
||||||
if peer.Send(DataChannel, struct{ ConsensusMessage }{msg}) {
|
if peer.Send(DataChannel, struct{ ConsensusMessage }{msg}) {
|
||||||
ps.SetHasProposal(rs.Proposal)
|
ps.SetHasProposal(rs.Proposal)
|
||||||
} else {
|
|
||||||
log.Warn("Failed to send ProposalMessage to peer")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ProposalPOL: lets peer know which POL votes we have so far.
|
// ProposalPOL: lets peer know which POL votes we have so far.
|
||||||
@ -489,9 +477,7 @@ OUTER_LOOP:
|
|||||||
ProposalPOLRound: rs.Proposal.POLRound,
|
ProposalPOLRound: rs.Proposal.POLRound,
|
||||||
ProposalPOL: rs.Votes.Prevotes(rs.Proposal.POLRound).BitArray(),
|
ProposalPOL: rs.Votes.Prevotes(rs.Proposal.POLRound).BitArray(),
|
||||||
}
|
}
|
||||||
if !peer.Send(DataChannel, struct{ ConsensusMessage }{msg}) {
|
peer.Send(DataChannel, struct{ ConsensusMessage }{msg})
|
||||||
log.Warn("Failed to send ProposalPOLMessage to peer")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
continue OUTER_LOOP
|
continue OUTER_LOOP
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user