dht: Reduce memory use

This commit is contained in:
Matt Joiner 2015-01-22 00:41:06 +11:00
parent c303ce09d8
commit 67b7c5adc8
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ import (
"github.com/anacrolix/libtorgo/bencode"
)
const maxNodes = 10000
const maxNodes = 1000
// Uniquely identifies a transaction to us.
type transactionKey struct {

View File

@ -41,7 +41,7 @@ func (s *Server) GetPeers(infoHash string) (*peerStream, error) {
stop: make(chan struct{}),
values: make(chan peerStreamValue),
},
triedAddrs: bloom.NewWithEstimates(10000, 0.01),
triedAddrs: bloom.NewWithEstimates(1000, 0.5),
server: s,
infoHash: infoHash,
}