make header for each task

This commit is contained in:
ucwong 2019-07-01 19:03:13 +08:00
parent f7cdea2bdc
commit bd9c29a25a

View file

@ -965,7 +965,9 @@ func (w *worker) commit(uncles []*types.Header, interval func(), update bool, st
*receipts[i] = *l
}
s := w.current.state.Copy()
block, err := w.engine.FinalizeAndAssemble(w.chain, w.current.header, s, w.current.txs, uncles, w.current.receipts)
h := new(types.Header)
*h = *w.current.header
block, err := w.engine.FinalizeAndAssemble(w.chain, h, s, w.current.txs, uncles, w.current.receipts)
if err != nil {
return err
}