code: func (peer *Peer) broadcast() error {
  	envelopes := peer.host.Envelopes()
  	bundle := make([]*Envelope, 0, len(envelopes))
  	for _, envelope := range envelopes {
  		if !peer.marked(envelope) && envelope.PoW() >= peer.powRequirement && peer.bloomMatch(envelope) {
  			bundle = append(bundle, envelope)
  		}
  	}
  
  	if len(bundle) > 0 {
  		// transmit the batch of envelopes
  		if err := p2p.Send(peer.ws, messagesCode, bundle); err != nil {
  			return err
  		}
  
  		// mark envelopes only if they were successfully sent
  		for _, e := range bundle {
  			peer.mark(e)
  		}
  
  		log.Trace("broadcast", "num. messages", len(bundle))
  	}
  	return nil
  }
docs: // broadcast iterates over the collection of envelopes and transmits yet unknown
  // ones over the network.