Skip to content

Commit

Permalink
Always return 3 strings
Browse files Browse the repository at this point in the history
  • Loading branch information
tgerring committed Mar 23, 2015
1 parent 31879ec commit 16a58f8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions rpc/miner_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,15 @@ out:
}
}

func (a *Agent) GetWork() []string {
func (a *Agent) GetWork() [3]string {
// TODO return HashNoNonce, DAGSeedHash, Difficulty
var res = []string{}
var res [3]string

// XXX Wait here untill work != nil ?.
if a.work != nil {
// 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
res[0] = a.work.HashNoNonce().Hex() // Header Hash No Nonce
res[1] = common.Hash{}.Hex() // DAG Seed
res[2] = common.Hash{}.Hex() // Difficulty
}

return res
Expand Down

0 comments on commit 16a58f8

Please sign in to comment.