From 31879eca8cfb9b759944ca48590a22e7509a58c5 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Mon, 23 Mar 2015 08:45:09 +0100 Subject: Stub corrected getWork response --- rpc/miner_agent.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'rpc/miner_agent.go') diff --git a/rpc/miner_agent.go b/rpc/miner_agent.go index 46fb87207..e812a7d51 100644 --- a/rpc/miner_agent.go +++ b/rpc/miner_agent.go @@ -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 { -- cgit v1.2.3