mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-26 03:01:42 +00:00
Add note on nondeterminism of Broadcast
This commit is contained in:
@ -301,6 +301,7 @@ func (sw *Switch) IsDialing(addr *NetAddress) bool {
|
|||||||
// Broadcast runs a go routine for each attempted send, which will block
|
// Broadcast runs a go routine for each attempted send, which will block
|
||||||
// trying to send for defaultSendTimeoutSeconds. Returns a channel
|
// trying to send for defaultSendTimeoutSeconds. Returns a channel
|
||||||
// which receives success values for each attempted send (false if times out)
|
// which receives success values for each attempted send (false if times out)
|
||||||
|
// NOTE: Broadcast uses goroutines, so order of broadcast may not be preserved.
|
||||||
func (sw *Switch) Broadcast(chID byte, msg interface{}) chan bool {
|
func (sw *Switch) Broadcast(chID byte, msg interface{}) chan bool {
|
||||||
successChan := make(chan bool, len(sw.peers.List()))
|
successChan := make(chan bool, len(sw.peers.List()))
|
||||||
log.Info("Broadcast", "channel", chID, "msg", msg)
|
log.Info("Broadcast", "channel", chID, "msg", msg)
|
||||||
|
Reference in New Issue
Block a user