private peers

Refs #1126
This commit is contained in:
Anton Kaliaev
2018-03-06 14:51:16 +04:00
parent 244d88dfda
commit 8bef3eb1f4
10 changed files with 36 additions and 11 deletions

View File

@ -421,6 +421,14 @@ func (n *Node) OnStart() error {
}
}
// Always connect to private peers, but do not add them to addrbook
if n.config.P2P.PrivatePeers != "" {
err = n.sw.DialPeersAsync(nil, strings.Split(n.config.P2P.PrivatePeers, ","), true)
if err != nil {
return err
}
}
// start tx indexer
return n.indexerService.Start()
}