code: func (d *Downloader) qosReduceConfidence() {
  	// If we have a single peer, confidence is always 1
  	peers := uint64(d.peers.Len())
  	if peers == 0 {
  		// Ensure peer connectivity races don't catch us off guard
  		return
  	}
  	if peers == 1 {
  		atomic.StoreUint64(&d.rttConfidence, 1000000)
  		return
  	}
  	// If we have a ton of peers, don't drop confidence)
  	if peers >= uint64(qosConfidenceCap) {
  		return
  	}
  	// Otherwise drop the confidence factor
  	conf := atomic.LoadUint64(&d.rttConfidence) * (peers - 1) / peers
  	if float64(conf)/1000000 < rttMinConfidence {
  		conf = uint64(rttMinConfidence * 1000000)
  	}
  	atomic.StoreUint64(&d.rttConfidence, conf)
  
  	rtt := time.Duration(atomic.LoadUint64(&d.rttEstimate))
  	log.Debug("Relaxed downloader QoS values", "rtt", rtt, "confidence", float64(conf)/1000000.0, "ttl", d.requestTTL())
  }
docs: // qosReduceConfidence is meant to be called when a new peer joins the downloader's
  // peer set, needing to reduce the confidence we have in out QoS estimates.