3 func (p *Peer) isLowOnRequests() bool {
4 return p.requestState.Requests.IsEmpty() && p.requestState.Cancelled.IsEmpty()
7 func (p *Peer) decPeakRequests() {
8 // // This can occur when peak requests are altered by the update request timer to be lower than
9 // // the actual number of outstanding requests. Let's let it go negative and see what happens. I
10 // // wonder what happens if maxRequests is not signed.
11 // if p.peakRequests < 1 {
12 // panic(p.peakRequests)