requesting.go | 5 +++++ diff --git a/requesting.go b/requesting.go index 7e42babacf5ccf087b28bcc70b067aab72eebe54..3d29d48173a2b62980fcdee729940cf85d8f2526 100644 --- a/requesting.go +++ b/requesting.go @@ -132,6 +132,11 @@ } } } for req := range next.Requests { + // This could happen if the peer chokes us between the next state being generated, and us + // trying to transmit the state. + if p.peerChoking && !p.peerAllowedFast.Contains(bitmap.BitIndex(req.Index)) { + continue + } more, err := p.request(req) if err != nil { panic(err)