good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
1356daad
Commit
1356daad
authored
Jul 27, 2015
by
Viktor Trón
Browse files
Options
Downloads
Patches
Plain Diff
etherbase defaults to first account even if created during the session
parent
d18d2564
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmd/geth/js_test.go
+2
-1
2 additions, 1 deletion
cmd/geth/js_test.go
eth/backend.go
+5
-1
5 additions, 1 deletion
eth/backend.go
with
7 additions
and
2 deletions
cmd/geth/js_test.go
+
2
−
1
View file @
1356daad
...
@@ -159,7 +159,7 @@ func TestAccounts(t *testing.T) {
...
@@ -159,7 +159,7 @@ func TestAccounts(t *testing.T) {
defer
os
.
RemoveAll
(
tmp
)
defer
os
.
RemoveAll
(
tmp
)
checkEvalJSON
(
t
,
repl
,
`eth.accounts`
,
`["`
+
testAddress
+
`"]`
)
checkEvalJSON
(
t
,
repl
,
`eth.accounts`
,
`["`
+
testAddress
+
`"]`
)
checkEvalJSON
(
t
,
repl
,
`eth.coinbase`
,
`
null
`
)
checkEvalJSON
(
t
,
repl
,
`eth.coinbase`
,
`
"`
+
testAddress
+
`"
`
)
val
,
err
:=
repl
.
re
.
Run
(
`personal.newAccount("password")`
)
val
,
err
:=
repl
.
re
.
Run
(
`personal.newAccount("password")`
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Errorf
(
"expected no error, got %v"
,
err
)
t
.
Errorf
(
"expected no error, got %v"
,
err
)
...
@@ -170,6 +170,7 @@ func TestAccounts(t *testing.T) {
...
@@ -170,6 +170,7 @@ func TestAccounts(t *testing.T) {
}
}
checkEvalJSON
(
t
,
repl
,
`eth.accounts`
,
`["`
+
testAddress
+
`","`
+
addr
+
`"]`
)
checkEvalJSON
(
t
,
repl
,
`eth.accounts`
,
`["`
+
testAddress
+
`","`
+
addr
+
`"]`
)
}
}
func
TestBlockChain
(
t
*
testing
.
T
)
{
func
TestBlockChain
(
t
*
testing
.
T
)
{
...
...
This diff is collapsed.
Click to expand it.
eth/backend.go
+
5
−
1
View file @
1356daad
...
@@ -489,8 +489,12 @@ func (s *Ethereum) StartMining(threads int) error {
...
@@ -489,8 +489,12 @@ func (s *Ethereum) StartMining(threads int) error {
func
(
s
*
Ethereum
)
Etherbase
()
(
eb
common
.
Address
,
err
error
)
{
func
(
s
*
Ethereum
)
Etherbase
()
(
eb
common
.
Address
,
err
error
)
{
eb
=
s
.
etherbase
eb
=
s
.
etherbase
if
(
eb
==
common
.
Address
{})
{
if
(
eb
==
common
.
Address
{})
{
addr
,
e
:=
s
.
AccountManager
()
.
AddressByIndex
(
0
)
if
e
!=
nil
{
err
=
fmt
.
Errorf
(
"etherbase address must be explicitly specified"
)
err
=
fmt
.
Errorf
(
"etherbase address must be explicitly specified"
)
}
}
eb
=
common
.
HexToAddress
(
addr
)
}
return
return
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment