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
d9addf79
Commit
d9addf79
authored
9 years ago
by
Gustav Simonsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve error string and remove unneeded else clause
parent
82920138
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
remote_agent.go
miner/remote_agent.go
+1
-2
eth.go
rpc/api/eth.go
+1
-1
errors.go
rpc/shared/errors.go
+4
-4
No files found.
miner/remote_agent.go
View file @
d9addf79
...
...
@@ -112,9 +112,8 @@ func (a *RemoteAgent) GetWork() ([3]string, error) {
a
.
work
[
block
.
HashNoNonce
()]
=
a
.
currentWork
return
res
,
nil
}
else
{
return
res
,
errors
.
New
(
"No work available yet, don't panic."
)
}
return
res
,
errors
.
New
(
"No work available yet, don't panic."
)
}
// Returns true or false, but does not indicate if the PoW was correct
...
...
This diff is collapsed.
Click to expand it.
rpc/api/eth.go
View file @
d9addf79
...
...
@@ -565,7 +565,7 @@ func (self *ethApi) GetWork(req *shared.Request) (interface{}, error) {
self
.
xeth
.
SetMining
(
true
,
0
)
ret
,
err
:=
self
.
xeth
.
RemoteMining
()
.
GetWork
()
if
err
!=
nil
{
return
nil
,
shared
.
NewNotReadyError
(
"
getW
ork"
)
return
nil
,
shared
.
NewNotReadyError
(
"
mining w
ork"
)
}
else
{
return
ret
,
nil
}
...
...
This diff is collapsed.
Click to expand it.
rpc/shared/errors.go
View file @
d9addf79
...
...
@@ -65,16 +65,16 @@ func NewNotImplementedError(method string) *NotImplementedError {
}
type
NotReadyError
struct
{
Method
string
Resource
string
}
func
(
e
*
NotReadyError
)
Error
()
string
{
return
fmt
.
Sprintf
(
"%s
method not ready"
,
e
.
Method
)
return
fmt
.
Sprintf
(
"%s
not ready"
,
e
.
Resource
)
}
func
NewNotReadyError
(
method
string
)
*
NotReadyError
{
func
NewNotReadyError
(
resource
string
)
*
NotReadyError
{
return
&
NotReadyError
{
Method
:
method
,
Resource
:
resource
,
}
}
...
...
This diff is collapsed.
Click to expand it.
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