MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / broadcastNewValidBlockMessage

Method broadcastNewValidBlockMessage

consensus/reactor.go:468–481  ·  view source on GitHub ↗
(rs *cstypes.RoundState)

Source from the content-addressed store, hash-verified

466}
467
468func (conR *Reactor) broadcastNewValidBlockMessage(rs *cstypes.RoundState) {
469 psh := rs.ProposalBlockParts.Header()
470 csMsg := &tmcons.NewValidBlock{
471 Height: rs.Height,
472 Round: rs.Round,
473 BlockPartSetHeader: psh.ToProto(),
474 BlockParts: rs.ProposalBlockParts.BitArray().ToProto(),
475 IsCommit: rs.Step == cstypes.RoundStepCommit,
476 }
477 conR.Switch.BroadcastEnvelope(p2p.Envelope{
478 ChannelID: StateChannel,
479 Message: csMsg,
480 })
481}
482
483// Broadcasts HasVoteMessage to peers that care.
484func (conR *Reactor) broadcastHasVoteMessage(vote *types.Vote) {

Callers 1

Calls 4

BroadcastEnvelopeMethod · 0.80
BitArrayMethod · 0.65
HeaderMethod · 0.45
ToProtoMethod · 0.45

Tested by

no test coverage detected