good morning!!!!

Skip to content
Snippets Groups Projects
Commit 8ed4f226 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

check for nil ptrs

parent 82956df5
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ out:
}
func (a *Agent) GetWork() common.Hash {
// XXX Wait here untill work != nil ?
// XXX Wait here untill work != nil ?.
if a.work != nil {
return a.work.HashNoNonce()
}
......@@ -64,7 +64,7 @@ func (a *Agent) GetWork() common.Hash {
func (a *Agent) SetResult(nonce uint64, mixDigest, seedHash common.Hash) {
// Make sure the external miner was working on the right hash
if a.currentWork.Hash() == a.work.Hash() {
if a.currentWork != nil && a.work != nil && a.currentWork.Hash() == a.work.Hash() {
a.returnCh <- miner.Work{a.currentWork.Number().Uint64(), nonce, mixDigest.Bytes(), seedHash.Bytes()}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment