aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-03-10 06:06:04 +0800
committerFelix Lange <fjl@twurst.com>2015-03-10 06:08:47 +0800
commitcd51860bf024d949a09b3863c88a278a386227a7 (patch)
tree86fc339ccbf02d48002c2799664d817072ce8709 /cmd
parent697f6748b8df6b50157f81eb7959d856d3eb688e (diff)
downloadgo-tangerine-cd51860bf024d949a09b3863c88a278a386227a7.tar.gz
go-tangerine-cd51860bf024d949a09b3863c88a278a386227a7.tar.zst
go-tangerine-cd51860bf024d949a09b3863c88a278a386227a7.zip
cmd/utils: delete InitConfig, KeyTasks
Diffstat (limited to 'cmd')
-rw-r--r--cmd/utils/cmd.go40
1 files changed, 0 insertions, 40 deletions
diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go
index 79ae7888a..271a879c7 100644
--- a/cmd/utils/cmd.go
+++ b/cmd/utils/cmd.go
@@ -29,7 +29,6 @@ import (
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
- "github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/logger"
@@ -96,14 +95,6 @@ func initDataDir(Datadir string) {
}
}
-func InitConfig(vmType int, ConfigFile string, Datadir string, EnvPrefix string) *ethutil.ConfigManager {
- initDataDir(Datadir)
- cfg := ethutil.ReadConfig(ConfigFile, Datadir, EnvPrefix)
- cfg.VmType = vmType
-
- return cfg
-}
-
func exit(err error) {
status := 0
if err != nil {
@@ -132,37 +123,6 @@ func StartEthereum(ethereum *eth.Ethereum) {
})
}
-func KeyTasks(keyManager *crypto.KeyManager, KeyRing string, GenAddr bool, SecretFile string, ExportDir string, NonInteractive bool) {
- var err error
- switch {
- case GenAddr:
- if NonInteractive || confirm("This action overwrites your old private key.") {
- err = keyManager.Init(KeyRing, 0, true)
- }
- exit(err)
- case len(SecretFile) > 0:
- SecretFile = ethutil.ExpandHomePath(SecretFile)
-
- if NonInteractive || confirm("This action overwrites your old private key.") {
- err = keyManager.InitFromSecretsFile(KeyRing, 0, SecretFile)
- }
- exit(err)
- case len(ExportDir) > 0:
- err = keyManager.Init(KeyRing, 0, false)
- if err == nil {
- err = keyManager.Export(ExportDir)
- }
- exit(err)
- default:
- // Creates a keypair if none exists
- err = keyManager.Init(KeyRing, 0, false)
- if err != nil {
- exit(err)
- }
- }
- clilogger.Infof("Main address %x\n", keyManager.Address())
-}
-
func FormatTransactionData(data string) []byte {
d := ethutil.StringToByteFunc(data, func(s string) (ret []byte) {
slice := regexp.MustCompile("\\n|\\s").Split(s, 1000000000)