2
0
mirror of synced 2025-02-23 22:28:11 +00:00

cmd/torrent: Include global dht starting nodes

This commit is contained in:
Matt Joiner 2017-08-28 20:54:37 +10:00
parent 6794ace27c
commit 756375879b

View File

@ -10,6 +10,7 @@ import (
"strings"
"time"
"github.com/anacrolix/dht"
_ "github.com/anacrolix/envpprof"
"github.com/anacrolix/tagflag"
"github.com/dustin/go-humanize"
@ -148,7 +149,11 @@ var flags = struct {
func main() {
log.SetFlags(log.LstdFlags | log.Lshortfile)
tagflag.Parse(&flags)
var clientConfig torrent.Config
clientConfig := torrent.Config{
DHTConfig: dht.ServerConfig{
StartingNodes: dht.GlobalBootstrapAddrs,
},
}
if flags.Mmap {
clientConfig.DefaultStorage = storage.NewMMap("")
}