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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
github
maticnetwork
bor
Commits
d9addf79
Commit
d9addf79
authored
9 years ago
by
Gustav Simonsson
Browse files
Options
Downloads
Patches
Plain Diff
Improve error string and remove unneeded else clause
parent
82920138
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
miner/remote_agent.go
+1
-2
1 addition, 2 deletions
miner/remote_agent.go
rpc/api/eth.go
+1
-1
1 addition, 1 deletion
rpc/api/eth.go
rpc/shared/errors.go
+4
-4
4 additions, 4 deletions
rpc/shared/errors.go
with
6 additions
and
7 deletions
miner/remote_agent.go
+
1
−
2
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
+
1
−
1
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
+
4
−
4
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.
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