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
31879eca
Commit
31879eca
authored
Mar 23, 2015
by
Taylor Gerring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stub corrected getWork response
parent
3772f025
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
api.go
rpc/api.go
+1
-1
miner_agent.go
rpc/miner_agent.go
+8
-3
No files found.
rpc/api.go
View file @
31879eca
...
...
@@ -349,7 +349,7 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error
*
reply
=
NewLogsRes
(
p
.
xeth
()
.
AllLogs
(
opts
))
case
"eth_getWork"
:
p
.
xeth
()
.
SetMining
(
true
)
*
reply
=
p
.
agent
.
GetWork
()
.
Hex
()
*
reply
=
p
.
agent
.
GetWork
()
case
"eth_submitWork"
:
args
:=
new
(
SubmitWorkArgs
)
if
err
:=
json
.
Unmarshal
(
req
.
Params
,
&
args
);
err
!=
nil
{
...
...
rpc/miner_agent.go
View file @
31879eca
...
...
@@ -54,14 +54,19 @@ out:
}
}
func
(
a
*
Agent
)
GetWork
()
common
.
Hash
{
func
(
a
*
Agent
)
GetWork
()
[]
string
{
// TODO return HashNoNonce, DAGSeedHash, Difficulty
var
res
=
[]
string
{}
// XXX Wait here untill work != nil ?.
if
a
.
work
!=
nil
{
return
a
.
work
.
HashNoNonce
()
// Ideally append in 1 call once params are determined
res
=
append
(
res
,
a
.
work
.
HashNoNonce
()
.
Hex
())
// Header Hash No Nonce
res
=
append
(
res
,
common
.
Hash
{}
.
Hex
())
// DAG Seed
res
=
append
(
res
,
common
.
Hash
{}
.
Hex
())
// Difficulty
}
return
common
.
Hash
{}
return
res
}
func
(
a
*
Agent
)
SetResult
(
nonce
uint64
,
mixDigest
,
seedHash
common
.
Hash
)
bool
{
...
...
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