Commit c713ea7c authored by Darrel Herbst's avatar Darrel Herbst Committed by Felix Lange

cmd/bootnode: fix exit behavior with -genkey (#20110)

parent 7f5f62aa
...@@ -70,7 +70,9 @@ func main() { ...@@ -70,7 +70,9 @@ func main() {
if err = crypto.SaveECDSA(*genKey, nodeKey); err != nil { if err = crypto.SaveECDSA(*genKey, nodeKey); err != nil {
utils.Fatalf("%v", err) utils.Fatalf("%v", err)
} }
if !*writeAddr {
return return
}
case *nodeKeyFile == "" && *nodeKeyHex == "": case *nodeKeyFile == "" && *nodeKeyHex == "":
utils.Fatalf("Use -nodekey or -nodekeyhex to specify a private key") utils.Fatalf("Use -nodekey or -nodekeyhex to specify a private key")
case *nodeKeyFile != "" && *nodeKeyHex != "": case *nodeKeyFile != "" && *nodeKeyHex != "":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment