dht: Reduce memory use
This commit is contained in:
parent
c303ce09d8
commit
67b7c5adc8
|
@ -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 {
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue