]> Sergey Matveev's repositories - btrtrc.git/blobdiff - peerconn.go
Update anacrolix/generics
[btrtrc.git] / peerconn.go
index c58745e2dce00c5d1181018fc74b7c4c083c52bc..989b2f816a6398ebe9e41fa1e3718c4a676f376b 100644 (file)
@@ -366,7 +366,7 @@ func (cn *Peer) iterContiguousPieceRequests(f func(piece pieceIndex, count int))
                        count++
                } else {
                        if count != 0 {
-                               f(last.Value(), count)
+                               f(last.Value, count)
                        }
                        last = item
                        count = 1
@@ -1400,8 +1400,8 @@ func (c *Peer) receiveChunk(msg *pp.Message) error {
        req := c.t.requestIndexFromRequest(ppReq)
        t := c.t
 
-       if c.bannableAddr.Ok() {
-               t.smartBanCache.RecordBlock(c.bannableAddr.Value(), req, msg.Piece)
+       if c.bannableAddr.Ok {
+               t.smartBanCache.RecordBlock(c.bannableAddr.Value, req, msg.Piece)
        }
 
        if c.peerChoking {