client.go | 2 +- misc.go | 5 ++++- diff --git a/client.go b/client.go index 6aaf5669055583f2726c180976ad2130ea11aa9f..d4f8640e68e6883ab9f8b42131c06fe515a6d558 100644 --- a/client.go +++ b/client.go @@ -64,7 +64,7 @@ // include ourselves if we end up trying to connect to our own address // through legitimate channels. dopplegangerAddrs map[string]struct{} badPeerIPs map[string]struct{} - torrents map[metainfo.Hash]*Torrent + torrents map[InfoHash]*Torrent acceptLimiter map[ipStr]int } diff --git a/misc.go b/misc.go index bab40e1721952fd936e1625d4004e8c41ec44db2..ecf91788fcd748dbe9fb6d597f739a170b56d5d5 100644 --- a/misc.go +++ b/misc.go @@ -169,4 +169,7 @@ } var unlimited = rate.NewLimiter(rate.Inf, 0) -type pieceIndex = int +type ( + pieceIndex = int + InfoHash = metainfo.Hash +)