From c713ea7c222c81d650908dcc3d69dbaf0fe63557 Mon Sep 17 00:00:00 2001 From: Darrel Herbst Date: Wed, 2 Oct 2019 05:32:02 -0400 Subject: [PATCH] cmd/bootnode: fix exit behavior with -genkey (#20110) --- cmd/bootnode/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/bootnode/main.go b/cmd/bootnode/main.go index 2f9bba111..f6e2a14c3 100644 --- a/cmd/bootnode/main.go +++ b/cmd/bootnode/main.go @@ -70,7 +70,9 @@ func main() { if err = crypto.SaveECDSA(*genKey, nodeKey); err != nil { utils.Fatalf("%v", err) } - return + if !*writeAddr { + return + } case *nodeKeyFile == "" && *nodeKeyHex == "": utils.Fatalf("Use -nodekey or -nodekeyhex to specify a private key") case *nodeKeyFile != "" && *nodeKeyHex != "":