code: func (pc *peerContainer) removeAttempt(ip string) (events []*peerEvent) {
  	if bundle, ok := pc.Bundles[ip]; ok {
  		if len(bundle.Attempts) > 0 {
  			events = append(events, &peerEvent{
  				Remove: RemoveAttempt,
  				IP:     ip,
  			})
  			bundle.Attempts = bundle.Attempts[1:]
  		}
  		if len(bundle.Attempts) < 1 && len(bundle.KnownPeers) < 1 {
  			events = append(events, &peerEvent{
  				Remove: RemoveBundle,
  				IP:     ip,
  			})
  			delete(pc.Bundles, ip)
  		}
  	}
  	return events
  }
docs: // removeAttempt removes the peer attempt belonging to the
  // given IP address and node ID from the peer tree.