code: func (pc *peerContainer) handleAttempt(event *peerEvent) []*peerEvent {
  	bundle, events := pc.bundle(event.IP)
  	bundle.Attempts = append(bundle.Attempts, &peerAttempt{
  		Connected:    *event.Connected,
  		Disconnected: *event.Disconnected,
  	})
  	pc.attemptOrder = append(pc.attemptOrder, event.IP)
  	for len(pc.attemptOrder) > attemptLimit {
  		// While the length of the connection attempt order array is greater
  		// than the limit, remove the first element from the involved peer's
  		// array and also from the super array.
  		events = append(events, pc.removeAttempt(pc.attemptOrder[0])...)
  		pc.attemptOrder = pc.attemptOrder[1:]
  	}
  	return events
  }
docs: // handleAttempt handles the events of the peers failing before/during the handshake.
  // Returns the events occurring during the extension.