From 6ef4e11dd0be202a41eca4051f69c6e48dbdc9b1 Mon Sep 17 00:00:00 2001 From: Minh Doan Date: Fri, 24 May 2019 17:18:49 -0700 Subject: [PATCH] clean up unused function --- node/staking.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/node/staking.go b/node/staking.go index 0232fb1ac..a43692265 100644 --- a/node/staking.go +++ b/node/staking.go @@ -1,10 +1,8 @@ package node import ( - "crypto/ecdsa" "encoding/hex" "math/big" - "os" "github.com/harmony-one/harmony/core/types" @@ -13,7 +11,6 @@ import ( "github.com/harmony-one/harmony/core" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/crypto" "github.com/harmony-one/harmony/internal/utils" "github.com/ethereum/go-ethereum/common/hexutil" @@ -90,18 +87,3 @@ func decodeFuncSign(data []byte) string { funcSign := hexutil.Encode(data[:funcSingatureBytes]) //The function signature is first 4 bytes of data in ethereum return funcSign } - -// StoreStakingKeyFromFile load the staking private key and store it in local keyfile -func StoreStakingKeyFromFile(keyfile string, priKey string) *ecdsa.PrivateKey { - // contract.FakeAccounts[0] gets minted tokens in genesis block of beacon chain. - key, err := crypto.HexToECDSA(priKey) - if err != nil { - utils.GetLogInstance().Error("Unable to get staking key") - os.Exit(1) - } - if err := crypto.SaveECDSA(keyfile, key); err != nil { - utils.GetLogInstance().Error("Unable to save the private key", "error", err) - os.Exit(1) - } - return key -}