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
eb82ca45
Commit
eb82ca45
authored
Jun 21, 2015
by
zelig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpc/js coinbase returns null if no etherbase set
parent
09b69831
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
js_test.go
cmd/geth/js_test.go
+1
-3
xeth.go
xeth/xeth.go
+4
-1
No files found.
cmd/geth/js_test.go
View file @
eb82ca45
...
@@ -140,7 +140,7 @@ func TestAccounts(t *testing.T) {
...
@@ -140,7 +140,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`
,
`
"`
+
common
.
Address
{}
.
Hex
()
+
`"
`
)
checkEvalJSON
(
t
,
repl
,
`eth.coinbase`
,
`
null
`
)
val
,
err
:=
repl
.
re
.
Run
(
`personal.newAccount("password")`
)
val
,
err
:=
repl
.
re
.
Run
(
`personal.newAccount("password")`
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -151,9 +151,7 @@ func TestAccounts(t *testing.T) {
...
@@ -151,9 +151,7 @@ func TestAccounts(t *testing.T) {
t
.
Errorf
(
"address not hex: %q"
,
addr
)
t
.
Errorf
(
"address not hex: %q"
,
addr
)
}
}
// skip until order fixed #824
// checkEvalJSON(t, repl, `eth.accounts`, `["`+testAddress+`", "`+addr+`"]`)
// checkEvalJSON(t, repl, `eth.accounts`, `["`+testAddress+`", "`+addr+`"]`)
// checkEvalJSON(t, repl, `eth.coinbase`, `"`+testAddress+`"`)
}
}
func
TestBlockChain
(
t
*
testing
.
T
)
{
func
TestBlockChain
(
t
*
testing
.
T
)
{
...
...
xeth/xeth.go
View file @
eb82ca45
...
@@ -477,7 +477,10 @@ func (self *XEth) IsListening() bool {
...
@@ -477,7 +477,10 @@ func (self *XEth) IsListening() bool {
}
}
func
(
self
*
XEth
)
Coinbase
()
string
{
func
(
self
*
XEth
)
Coinbase
()
string
{
eb
,
_
:=
self
.
backend
.
Etherbase
()
eb
,
err
:=
self
.
backend
.
Etherbase
()
if
err
!=
nil
{
return
"0x0"
}
return
eb
.
Hex
()
return
eb
.
Hex
()
}
}
...
...
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