code: func (d *Downloader) UnregisterPeer(id string) error {
  	// Unregister the peer from the active peer set and revoke any fetch tasks
  	logger := log.New("peer", id)
  	logger.Trace("Unregistering sync peer")
  	if err := d.peers.Unregister(id); err != nil {
  		logger.Error("Failed to unregister sync peer", "err", err)
  		return err
  	}
  	d.queue.Revoke(id)
  
  	// If this peer was the master peer, abort sync immediately
  	d.cancelLock.RLock()
  	master := id == d.cancelPeer
  	d.cancelLock.RUnlock()
  
  	if master {
  		d.cancel()
  	}
  	return nil
  }
docs: // UnregisterPeer remove a peer from the known list, preventing any action from
  // the specified peer. An effort is also made to return any pending fetches into
  // the queue.