keep peers separate from other nodes in dht

This commit is contained in:
Arceliar 2018-03-10 13:58:48 -06:00
parent e04ab7cfe6
commit 9ce0b7fbea
5 changed files with 72 additions and 34 deletions

View file

@ -113,7 +113,7 @@ func generateConfig(isAutoconf bool) *nodeConfig {
cfg.Listen = "[::]:0"
} else {
r1 := rand.New(rand.NewSource(time.Now().UnixNano()))
cfg.Listen = fmt.Sprintf("[::]:%d", r1.Intn(65534 - 32768) + 32768)
cfg.Listen = fmt.Sprintf("[::]:%d", r1.Intn(65534-32768)+32768)
}
cfg.AdminListen = "[::1]:9001"
cfg.BoxPub = hex.EncodeToString(bpub[:])