code: func (q *TransmitLimitedQueue) queueBroadcast(b Broadcast, initialTransmits int) {
  	q.mu.Lock()
  	defer q.mu.Unlock()
  
  	q.lazyInit()
  
  	if q.idGen == math.MaxInt64 {
  		// it's super duper unlikely to wrap around within the retransmit limit
  		q.idGen = 1
  	} else {
  		q.idGen++
  	}
  	id := q.idGen
  
  	lb := &limitedBroadcast{
  		transmits: initialTransmits,
  		msgLen:    int64(len(b.Message())),
  		id:        id,
  		b:         b,
  	}
  	unique := false
  	if nb, ok := b.(NamedBroadcast); ok {
  		lb.name = nb.Name()
  	} else if _, ok := b.(UniqueBroadcast); ok {
  		unique = true
  	}
  
  	// Check if this message invalidates another.
  	if lb.name != "" {
  		if old, ok := q.tm[lb.name]; ok {
  			old.b.Finished()
  			q.deleteItem(old)
  		}
  	} else if !unique {
  		// Slow path, hopefully nothing hot hits this.
  		var remove []*limitedBroadcast
  		q.tq.Ascend(func(item btree.Item) bool {
  			cur := item.(*limitedBroadcast)
  
  			// Special Broadcasts can only invalidate each other.
  			switch cur.b.(type) {
  			case NamedBroadcast:
  				// noop
  			case UniqueBroadcast:
  				// noop
  			default:
  				if b.Invalidates(cur.b) {
  					cur.b.Finished()
  					remove = append(remove, cur)
  				}
  			}
  			return true
  		})
  		for _, cur := range remove {
  			q.deleteItem(cur)
  		}
  	}
  
  	// Append to the relevant queue.
  	q.addItem(lb)
  }
docs: // queueBroadcast is like QueueBroadcast but you can use a nonzero value for
  // the initial transmit tier assigned to the message. This is meant to be used
  // for unit testing.