code: func (d *Downloader) deliver(id string, destCh chan dataPack, packet dataPack, inMeter, dropMeter metrics.Meter) (err error) {
  	// Update the delivery metrics for both good and failed deliveries
  	inMeter.Mark(int64(packet.Items()))
  	defer func() {
  		if err != nil {
  			dropMeter.Mark(int64(packet.Items()))
  		}
  	}()
  	// Deliver or abort if the sync is canceled while queuing
  	d.cancelLock.RLock()
  	cancel := d.cancelCh
  	d.cancelLock.RUnlock()
  	if cancel == nil {
  		return errNoSyncActive
  	}
  	select {
  	case destCh <- packet:
  		return nil
  	case <-cancel:
  		return errNoSyncActive
  	}
  }
docs: // deliver injects a new batch of data received from a remote node.