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
0c9c5439
Commit
0c9c5439
authored
Jul 07, 2015
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/0.9.36' into develop
parents
9e7d5d9d
d673c34c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
14 deletions
+21
-14
main.go
cmd/geth/main.go
+13
-10
flags.go
cmd/utils/flags.go
+7
-3
natspec_e2e_test.go
common/natspec/natspec_e2e_test.go
+1
-1
No files found.
cmd/geth/main.go
View file @
0c9c5439
...
...
@@ -49,7 +49,7 @@ import (
const
(
ClientIdentifier
=
"Geth"
Version
=
"0.9.3
5
"
Version
=
"0.9.3
6
"
)
var
(
...
...
@@ -458,7 +458,8 @@ func execJSFiles(ctx *cli.Context) {
func
unlockAccount
(
ctx
*
cli
.
Context
,
am
*
accounts
.
Manager
,
addr
string
,
i
int
)
(
addrHex
,
auth
string
)
{
var
err
error
addrHex
=
utils
.
ParamToAddress
(
addr
,
am
)
addrHex
,
err
=
utils
.
ParamToAddress
(
addr
,
am
)
if
err
==
nil
{
// Attempt to unlock the account 3 times
attempts
:=
3
for
tries
:=
0
;
tries
<
attempts
;
tries
++
{
...
...
@@ -469,6 +470,8 @@ func unlockAccount(ctx *cli.Context, am *accounts.Manager, addr string, i int) (
break
}
}
}
if
err
!=
nil
{
utils
.
Fatalf
(
"Unlock account failed '%v'"
,
err
)
}
...
...
cmd/utils/flags.go
View file @
0c9c5439
...
...
@@ -369,6 +369,10 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config {
clientID
+=
"/"
+
customName
}
am
:=
MakeAccountManager
(
ctx
)
etherbase
,
err
:=
ParamToAddress
(
ctx
.
GlobalString
(
EtherbaseFlag
.
Name
),
am
)
if
err
!=
nil
{
glog
.
V
(
logger
.
Error
)
.
Infoln
(
"WARNING: No etherbase set and no accounts found as default"
)
}
return
&
eth
.
Config
{
Name
:
common
.
MakeName
(
clientID
,
version
),
...
...
@@ -380,7 +384,7 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config {
LogFile
:
ctx
.
GlobalString
(
LogFileFlag
.
Name
),
Verbosity
:
ctx
.
GlobalInt
(
VerbosityFlag
.
Name
),
LogJSON
:
ctx
.
GlobalString
(
LogJSONFlag
.
Name
),
Etherbase
:
common
.
HexToAddress
(
ParamToAddress
(
ctx
.
GlobalString
(
EtherbaseFlag
.
Name
),
am
)
),
Etherbase
:
common
.
HexToAddress
(
etherbase
),
MinerThreads
:
ctx
.
GlobalInt
(
MinerThreadsFlag
.
Name
),
AccountManager
:
am
,
VmDebug
:
ctx
.
GlobalBool
(
VMDebugFlag
.
Name
),
...
...
@@ -508,7 +512,7 @@ func StartPProf(ctx *cli.Context) {
}()
}
func
ParamToAddress
(
addr
string
,
am
*
accounts
.
Manager
)
(
addrHex
string
)
{
func
ParamToAddress
(
addr
string
,
am
*
accounts
.
Manager
)
(
addrHex
string
,
err
error
)
{
if
!
((
len
(
addr
)
==
40
)
||
(
len
(
addr
)
==
42
))
{
// with or without 0x
index
,
err
:=
strconv
.
Atoi
(
addr
)
if
err
!=
nil
{
...
...
@@ -517,7 +521,7 @@ func ParamToAddress(addr string, am *accounts.Manager) (addrHex string) {
addrHex
,
err
=
am
.
AddressByIndex
(
index
)
if
err
!=
nil
{
Fatalf
(
"%v"
,
err
)
return
""
,
err
}
}
else
{
addrHex
=
addr
...
...
common/natspec/natspec_e2e_test.go
View file @
0c9c5439
...
...
@@ -141,7 +141,7 @@ func testEth(t *testing.T) (ethereum *eth.Ethereum, err error) {
AccountManager
:
am
,
MaxPeers
:
0
,
PowTest
:
true
,
Etherbase
:
testAddress
,
Etherbase
:
common
.
HexToAddress
(
testAddress
)
,
})
if
err
!=
nil
{
...
...
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