// Have that would potentially alter it.
func TestSendBitfieldThenHave(t *testing.T) {
r, w := io.Pipe()
- var cl Client
+ cl := Client{
+ config: &ClientConfig{DownloadRateLimiter: unlimited},
+ }
cl.initLogger()
c := cl.newConnection(nil, false)
c.setTorrent(cl.newTorrent(metainfo.Hash{}, nil))
func BenchmarkConnectionMainReadLoop(b *testing.B) {
cl := &Client{
- downloadLimit: unlimited,
+ config: &ClientConfig{
+ DownloadRateLimiter: unlimited,
+ },
}
ts := &torrentStorage{}
t := &Torrent{