Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node: Allow no heartbeating in testnet #4240

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion node/cmd/guardiand/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ func runNode(cmd *cobra.Command, args []string) {

// Verify flags

if *nodeName == "" {
if *nodeName == "" && env == common.MainNet {
logger.Fatal("Please specify --nodeName")
}
if *nodeKeyPath == "" && env != common.UnsafeDevNet { // In devnet mode, keys are deterministically generated.
Expand Down Expand Up @@ -780,6 +780,10 @@ func runNode(cmd *cobra.Command, args []string) {
logger.Fatal("Please specify --telemetryLokiURL or set --disableTelemetry=false")
}

if *nodeName == "" {
logger.Fatal("If telemetry is enabled, --nodeName must be set")
}

// Get libp2p peer ID from private key
pk := p2pKey.GetPublic()
peerID, err := peer.IDFromPublicKey(pk)
Expand Down
Loading