Update anacrolix/generics
This commit is contained in:
parent
58200a304c
commit
32cdaf4ada
2
go.mod
2
go.mod
|
@ -12,7 +12,7 @@ require (
|
|||
github.com/anacrolix/dht/v2 v2.16.2-0.20220311024416-dd658f18fd51
|
||||
github.com/anacrolix/envpprof v1.2.1
|
||||
github.com/anacrolix/fuse v0.2.0
|
||||
github.com/anacrolix/generics v0.0.0-20220510042907-b50562b436ec
|
||||
github.com/anacrolix/generics v0.0.0-20220618083756-f99e35403a60
|
||||
github.com/anacrolix/go-libutp v1.2.0
|
||||
github.com/anacrolix/log v0.13.1
|
||||
github.com/anacrolix/missinggo v1.3.0
|
||||
|
|
4
go.sum
4
go.sum
|
@ -39,8 +39,8 @@ github.com/anacrolix/envpprof v1.2.1 h1:25TJe6t/i0AfzzldiGFKCpD+s+dk8lONBcacJZB2
|
|||
github.com/anacrolix/envpprof v1.2.1/go.mod h1:My7T5oSqVfEn4MD4Meczkw/f5lSIndGAKu/0SM/rkf4=
|
||||
github.com/anacrolix/fuse v0.2.0 h1:pc+To78kI2d/WUjIyrsdqeJQAesuwpGxlI3h1nAv3Do=
|
||||
github.com/anacrolix/fuse v0.2.0/go.mod h1:Kfu02xBwnySDpH3N23BmrP3MDfwAQGRLUCj6XyeOvBQ=
|
||||
github.com/anacrolix/generics v0.0.0-20220510042907-b50562b436ec h1:OnHX2MpnlLBBee06jcpL6eBppz766BnquXnZKH6iGgI=
|
||||
github.com/anacrolix/generics v0.0.0-20220510042907-b50562b436ec/go.mod h1:ff2rHB/joTV03aMSSn/AZNnaIpUw0h3njetGsaXcMy8=
|
||||
github.com/anacrolix/generics v0.0.0-20220618083756-f99e35403a60 h1:k4/h2B1gGF+PJGyGHxs8nmHHt1pzWXZWBj6jn4OBlRc=
|
||||
github.com/anacrolix/generics v0.0.0-20220618083756-f99e35403a60/go.mod h1:ff2rHB/joTV03aMSSn/AZNnaIpUw0h3njetGsaXcMy8=
|
||||
github.com/anacrolix/go-libutp v1.2.0 h1:sjxoB+/ARiKUR7IK/6wLWyADIBqGmu1fm0xo+8Yy7u0=
|
||||
github.com/anacrolix/go-libutp v1.2.0/go.mod h1:RrJ3KcaDcf9Jqp33YL5V/5CBEc6xMc7aJL8wXfuWL50=
|
||||
github.com/anacrolix/log v0.3.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU=
|
||||
|
|
|
@ -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 {
|
||||
|
|
2
t.go
2
t.go
|
@ -147,7 +147,7 @@ func (t *Torrent) Name() string {
|
|||
// The completed length of all the torrent data, in all its files. This is
|
||||
// derived from the torrent info, when it is available.
|
||||
func (t *Torrent) Length() int64 {
|
||||
return t._length.Value()
|
||||
return t._length.Value
|
||||
}
|
||||
|
||||
// Returns a run-time generated metainfo for the torrent that includes the
|
||||
|
|
|
@ -168,7 +168,7 @@ type Torrent struct {
|
|||
}
|
||||
|
||||
func (t *Torrent) length() int64 {
|
||||
return t._length.Value()
|
||||
return t._length.Value
|
||||
}
|
||||
|
||||
func (t *Torrent) selectivePieceAvailabilityFromPeers(i pieceIndex) (count int) {
|
||||
|
@ -2157,7 +2157,7 @@ func (t *Torrent) dropBannedPeers() {
|
|||
t.iterPeers(func(p *Peer) {
|
||||
remoteIp := p.remoteIp()
|
||||
if remoteIp == nil {
|
||||
if p.bannableAddr.Ok() {
|
||||
if p.bannableAddr.Ok {
|
||||
t.logger.WithDefaultLevel(log.Debug).Printf("can't get remote ip for peer %v", p)
|
||||
}
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue