From e1d6fc234114ffaa2e87003b40011955d44aa4d6 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sat, 7 Jul 2018 11:32:52 +1000 Subject: [PATCH] Add torrent.InfoHash type alias --- client.go | 2 +- misc.go | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client.go b/client.go index 6aaf5669..d4f8640e 100644 --- a/client.go +++ b/client.go @@ -64,7 +64,7 @@ type Client struct { // 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 bab40e17..ecf91788 100644 --- a/misc.go +++ b/misc.go @@ -169,4 +169,7 @@ func min(as ...int64) int64 { var unlimited = rate.NewLimiter(rate.Inf, 0) -type pieceIndex = int +type ( + pieceIndex = int + InfoHash = metainfo.Hash +) -- 2.48.1