Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
cd51860b
Commit
cd51860b
authored
Mar 09, 2015
by
Felix Lange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/utils: delete InitConfig, KeyTasks
parent
697f6748
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
40 deletions
+0
-40
cmd.go
cmd/utils/cmd.go
+0
-40
No files found.
cmd/utils/cmd.go
View file @
cd51860b
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment