core/types: make blocks immutable

This commit is contained in:
Felix Lange
2015-06-16 12:41:50 +02:00
committed by Jeffrey Wilcke
parent 654564e164
commit 1d42888d30
17 changed files with 457 additions and 587 deletions

View File

@ -81,9 +81,7 @@ func (a *RemoteAgent) SubmitWork(nonce uint64, mixDigest, seedHash common.Hash)
// Make sure the external miner was working on the right hash
if a.currentWork != nil && a.work != nil {
a.currentWork.SetNonce(nonce)
a.currentWork.Header().MixDigest = mixDigest
a.returnCh <- a.currentWork
a.returnCh <- a.currentWork.WithMiningResult(nonce, mixDigest)
//a.returnCh <- Work{a.currentWork.Number().Uint64(), nonce, mixDigest.Bytes(), seedHash.Bytes()}
return true
}