From afe80c36064b362f4152efa23b53f68cd241236b Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Sat, 22 Jun 2019 11:52:23 -0700 Subject: [PATCH 1/2] [node] print out pub blskey if it can't be found Signed-off-by: Leo Chen --- cmd/harmony/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/harmony/main.go b/cmd/harmony/main.go index 411829c32..183057517 100644 --- a/cmd/harmony/main.go +++ b/cmd/harmony/main.go @@ -200,9 +200,10 @@ func setUpConsensusKeyAndReturnIndex(nodeConfig *nodeconfig.ConfigType) (int, *g fmt.Printf("error when loading bls key, err :%v\n", err) os.Exit(100) } - index, acc := genesis.IsBlsPublicKeyIndex(consensusPriKey.GetPublicKey().SerializeToHexStr()) + pubKey := consensusPriKey.GetPublicKey() + index, acc := genesis.IsBlsPublicKeyIndex(pubKey.SerializeToHexStr()) if index < 0 { - fmt.Println("Can not found your bls key.") + fmt.Printf("can not found your bls key: %s\n", pubKey.SerializeToHexStr()) os.Exit(100) } From 3b04b4decd9bbd04dfb4190929560071c2c63e6f Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Sat, 22 Jun 2019 22:48:45 -0700 Subject: [PATCH 2/2] Update cmd/harmony/main.go Co-Authored-By: Eugene Kim --- cmd/harmony/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/harmony/main.go b/cmd/harmony/main.go index 183057517..f76e0b803 100644 --- a/cmd/harmony/main.go +++ b/cmd/harmony/main.go @@ -203,7 +203,7 @@ func setUpConsensusKeyAndReturnIndex(nodeConfig *nodeconfig.ConfigType) (int, *g pubKey := consensusPriKey.GetPublicKey() index, acc := genesis.IsBlsPublicKeyIndex(pubKey.SerializeToHexStr()) if index < 0 { - fmt.Printf("can not found your bls key: %s\n", pubKey.SerializeToHexStr()) + fmt.Printf("cannot find your BLS key in the genesis/FN tables: %s\n", pubKey.SerializeToHexStr()) os.Exit(100) }