diff --git a/core/parallel_state_processor.go b/core/parallel_state_processor.go index 018e66f19..26f0637c3 100644 --- a/core/parallel_state_processor.go +++ b/core/parallel_state_processor.go @@ -622,28 +622,30 @@ func (p *ParallelStateProcessor) confirmTxResults(statedb *state.StateDB, gp *Ga } resultTxIndex := result.txReq.txIndex + + var root []byte + header := result.txReq.block.Header() + + isByzantium := p.config.IsByzantium(header.Number) + isEIP158 := p.config.IsEIP158(header.Number) + result.slotDB.FinaliseForParallel(isByzantium || isEIP158, statedb) + + // merge slotDB into mainDB + statedb.MergeSlotDB(result.slotDB, result.receipt, resultTxIndex, result.result.delayFees) + delayGasFee := result.result.delayFees // add delayed gas fee if delayGasFee != nil { if delayGasFee.TipFee != nil { - result.slotDB.AddBalance(delayGasFee.Coinbase, delayGasFee.TipFee) + statedb.AddBalance(delayGasFee.Coinbase, delayGasFee.TipFee) } if delayGasFee.BaseFee != nil { - result.slotDB.AddBalance(params.OptimismBaseFeeRecipient, delayGasFee.BaseFee) + statedb.AddBalance(params.OptimismBaseFeeRecipient, delayGasFee.BaseFee) } if delayGasFee.L1Fee != nil { - result.slotDB.AddBalance(params.OptimismL1FeeRecipient, delayGasFee.L1Fee) + statedb.AddBalance(params.OptimismL1FeeRecipient, delayGasFee.L1Fee) } } - var root []byte - header := result.txReq.block.Header() - - isByzantium := p.config.IsByzantium(header.Number) - isEIP158 := p.config.IsEIP158(header.Number) - result.slotDB.FinaliseForParallel(isByzantium || isEIP158, statedb) - - // merge slotDB into mainDB - statedb.MergeSlotDB(result.slotDB, result.receipt, resultTxIndex, result.result.delayFees) // Do IntermediateRoot after mergeSlotDB. if !isByzantium {