MCPcopy Create free account
hub / github.com/DNAProject/DNA / broadcastToAll

Method broadcastToAll

consensus/vbft/node_utils.go:434–446  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

432}
433
434func (self *Server) broadcastToAll(data []byte) error {
435 msg := &p2pmsg.ConsensusPayload{
436 Data: data,
437 Owner: self.account.PublicKey,
438 }
439
440 sink := common.NewZeroCopySink(nil)
441 msg.SerializationUnsigned(sink)
442 msg.Signature, _ = signature.Sign(self.account, sink.Bytes())
443
444 self.p2p.Broadcast(msg)
445 return nil
446}

Callers 1

msgSendLoopMethod · 0.95

Calls 5

SerializationUnsignedMethod · 0.95
BytesMethod · 0.95
NewZeroCopySinkFunction · 0.92
SignFunction · 0.92
BroadcastMethod · 0.45

Tested by

no test coverage detected