瀏覽代碼

miner: fixed remote miner current work

obscuren 10 年之前
父節點
當前提交
2cc9211269
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      miner/remote_agent.go

+ 2 - 1
miner/remote_agent.go

@@ -50,7 +50,6 @@ out:
 			break out
 		case work := <-a.workCh:
 			a.work = work
-			a.returnCh <- nil
 		}
 	}
 }
@@ -60,6 +59,8 @@ func (a *RemoteAgent) GetWork() [3]string {
 
 	// XXX Wait here until work != nil ?
 	if a.work != nil {
+		a.currentWork = a.work
+
 		res[0] = a.work.HashNoNonce().Hex()
 		seedHash, _ := ethash.GetSeedHash(a.currentWork.NumberU64())
 		res[1] = common.Bytes2Hex(seedHash)