Commit 616b7a28 authored by Mark Tyneway's avatar Mark Tyneway

l2geth: small changes to miner codepath

These are minor changes to the miner codepath.
parent c42fc0df
---
'@eth-optimism/l2geth': patch
---
Small fixes to miner codepath
...@@ -895,7 +895,7 @@ func (w *worker) commitNewTx(tx *types.Transaction) error { ...@@ -895,7 +895,7 @@ func (w *worker) commitNewTx(tx *types.Transaction) error {
} }
header := &types.Header{ header := &types.Header{
ParentHash: parent.Hash(), ParentHash: parent.Hash(),
Number: num.Add(num, common.Big1), Number: new(big.Int).Add(num, common.Big1),
GasLimit: w.config.GasFloor, GasLimit: w.config.GasFloor,
Extra: w.extra, Extra: w.extra,
Time: tx.L1Timestamp(), Time: tx.L1Timestamp(),
...@@ -915,7 +915,7 @@ func (w *worker) commitNewTx(tx *types.Transaction) error { ...@@ -915,7 +915,7 @@ func (w *worker) commitNewTx(tx *types.Transaction) error {
if w.commitTransactions(txs, w.coinbase, nil) { if w.commitTransactions(txs, w.coinbase, nil) {
return errors.New("Cannot commit transaction in miner") return errors.New("Cannot commit transaction in miner")
} }
return w.commit([]*types.Header{}, w.fullTaskHook, true, tstart) return w.commit(nil, w.fullTaskHook, true, tstart)
} }
// commitNewWork generates several new sealing tasks based on the parent block. // commitNewWork generates several new sealing tasks based on the parent block.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment