Skip to content

Commit 48bb28e

Browse files
committed
discover v4 enable & bootnodes added
1 parent 4c728aa commit 48bb28e

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

cmd/cortex/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ var (
127127
//utils.MinerAlgorithmFlag,
128128
utils.NATFlag,
129129
utils.NoDiscoverFlag,
130+
utils.DiscoveryV4Flag,
130131
utils.DiscoveryV5Flag,
131132
utils.NetrestrictFlag,
132133
utils.NodeKeyFileFlag,

cmd/utils/flags.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,10 @@ var (
719719
Name: "nodiscover",
720720
Usage: "Disables the peer discovery mechanism (manual peer addition)",
721721
}
722+
DiscoveryV4Flag = cli.BoolFlag{
723+
Name: "discovery.v4",
724+
Usage: "Enables the V4 discovery mechanism",
725+
}
722726
DiscoveryV5Flag = cli.BoolFlag{
723727
Name: "v5disc",
724728
Usage: "Enables the experimental RLPx V5 (Topic Discovery) mechanism",
@@ -1197,6 +1201,7 @@ func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config) {
11971201
// unless it is explicitly disabled with --nodiscover note that explicitly specifying
11981202
// --v5disc overrides --nodiscover, in which case the later only disables v4 discovery
11991203
//forceV5Discovery := (lightClient || lightServer) && !ctx.GlobalBool(NoDiscoverFlag.Name)
1204+
cfg.DiscoveryV4 = !cfg.NoDiscovery //ctx.GlobalBool(DiscoveryV4Flag.Name)
12001205
if ctx.GlobalIsSet(DiscoveryV5Flag.Name) {
12011206
cfg.DiscoveryV5 = ctx.GlobalBool(DiscoveryV5Flag.Name)
12021207
//} else if forceV5Discovery {

params/bootnodes.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ import "github.com/CortexFoundation/CortexTheseus/common"
2323
var MainnetBootnodes = []string{
2424
"enode://953226ae83e451fd78fe37bbedc55892f3e3407ae2f0c6a043ff35699fa8d45829a2490b05ce8c5de5f0b9af1b67fd5c1701eea7573a587abe0a7f8e93e5c694@35.178.69.64:40404",
2525
"enode://78f3feb1781f61a6a52abeaeeefeddec5b52383d0b1d0cf2a14c92ba90dc60ff010f4489b9ca3bd103ae6867cc679fea1b8558bbd515a96e828a0c7b52869bb5@47.95.215.37:40404",
26+
"enode://881f6548ee68e087ec157e479b96046660b96385c6fc4fe5d00d65404b725e49c4b16f85a6c1e606412f5caf82a581266b7dc1568d0cec3ea738a5589fdd3d01@47.242.33.115:37566",
27+
"enode://7b6bc170ccc16f63e032b9531f4fe86dd5547a8a67ca57452966e5851450681867f53c064058f61af4ce808fbdafc027b6995c14b25c04de1b082e94ceb9a400@52.76.52.58:40404",
2628
}
2729

2830
var V5Bootnodes = []string{

0 commit comments

Comments
 (0)