This commit is contained in:
Liang-Chi Hsieh 2017-04-11 17:25:49 +00:00 committed by GitHub
commit f349bd8be7
3 changed files with 9 additions and 2 deletions

View file

@ -89,6 +89,7 @@ func init() {
utils.UnlockedAccountFlag,
utils.PasswordFileFlag,
utils.BootnodesFlag,
utils.BootnodesV5Flag,
utils.DataDirFlag,
utils.KeyStoreDirFlag,
utils.EthashCacheDirFlag,

View file

@ -127,6 +127,7 @@ var AppHelpFlagGroups = []flagGroup{
Name: "NETWORKING",
Flags: []cli.Flag{
utils.BootnodesFlag,
utils.BootnodesV5Flag,
utils.ListenPortFlag,
utils.MaxPeersFlag,
utils.MaxPendingPeersFlag,

View file

@ -365,6 +365,11 @@ var (
Usage: "Comma separated enode URLs for P2P discovery bootstrap",
Value: "",
}
BootnodesV5Flag = cli.StringFlag{
Name: "v5bootnodes",
Usage: "Comma separated enode URLs for experimental RLPx V5 (Topic Discovery) bootstrap",
Value: "",
}
NodeKeyFileFlag = cli.StringFlag{
Name: "nodekey",
Usage: "P2P node key file",
@ -541,8 +546,8 @@ func MakeBootstrapNodes(ctx *cli.Context) []*discover.Node {
// flags, reverting to pre-configured ones if none have been specified.
func MakeBootstrapNodesV5(ctx *cli.Context) []*discv5.Node {
urls := params.DiscoveryV5Bootnodes
if ctx.GlobalIsSet(BootnodesFlag.Name) {
urls = strings.Split(ctx.GlobalString(BootnodesFlag.Name), ",")
if ctx.GlobalIsSet(BootnodesV5Flag.Name) {
urls = strings.Split(ctx.GlobalString(BootnodesV5Flag.Name), ",")
}
bootnodes := make([]*discv5.Node, 0, len(urls))