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
6b63759d
Commit
6b63759d
authored
Mar 11, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reverted global
parent
7add66c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
8 deletions
+3
-8
main.go
cmd/ethereum/main.go
+1
-1
flags.go
cmd/utils/flags.go
+2
-7
No files found.
cmd/ethereum/main.go
View file @
6b63759d
...
...
@@ -201,7 +201,7 @@ func startEth(ctx *cli.Context, eth *eth.Ethereum) {
if
len
(
split
)
!=
2
{
utils
.
Fatalf
(
"Illegal 'unlock' format (address:password)"
)
}
am
:=
utils
.
GetAccountManager
(
ctx
)
am
:=
eth
.
AccountManager
(
)
// Attempt to unlock the account
err
:=
am
.
Unlock
(
ethutil
.
Hex2Bytes
(
split
[
0
]),
split
[
1
])
if
err
!=
nil
{
...
...
cmd/utils/flags.go
View file @
6b63759d
...
...
@@ -222,15 +222,10 @@ func GetChain(ctx *cli.Context) (*core.ChainManager, ethutil.Database, ethutil.D
return
core
.
NewChainManager
(
blockDb
,
stateDb
,
new
(
event
.
TypeMux
)),
blockDb
,
stateDb
}
// Global account manager
var
km
*
accounts
.
Manager
func
GetAccountManager
(
ctx
*
cli
.
Context
)
*
accounts
.
Manager
{
dataDir
:=
ctx
.
GlobalString
(
DataDirFlag
.
Name
)
if
km
==
nil
{
ks
:=
crypto
.
NewKeyStorePassphrase
(
path
.
Join
(
dataDir
,
"keys"
))
km
=
accounts
.
NewManager
(
ks
)
}
ks
:=
crypto
.
NewKeyStorePassphrase
(
path
.
Join
(
dataDir
,
"keys"
))
km
:=
accounts
.
NewManager
(
ks
)
return
km
}
...
...
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