@@ -122,7 +122,7 @@ func (p *PEVMProcessor) executeInSlot(maindb *state.StateDB, txReq *PEVMTxReques
122122// if it is in Stage 2 it is a likely result, not 100% sure
123123func (p * PEVMProcessor ) toConfirmTxIndexResult (txResult * PEVMTxResult ) error {
124124 txReq := txResult .txReq
125- if ! p .unorderedMerge || ! txReq . useDAG {
125+ if ! p .unorderedMerge {
126126 // If we do not use a DAG, then we need to check for conflicts to ensure correct execution.
127127 // When we perform an unordered merge, we cannot conduct conflict checks
128128 // and can only choose to trust that the DAG is correct and that conflicts do not exist.
@@ -166,7 +166,6 @@ func (p *PEVMProcessor) confirmTxResult(statedb *state.StateDB, gp *GasPool, res
166166
167167 isByzantium := p .config .IsByzantium (header .Number )
168168 isEIP158 := p .config .IsEIP158 (header .Number )
169- //result.slotDB.FinaliseForParallel(isByzantium || isEIP158, statedb)
170169 if err := result .slotDB .Merge (isByzantium || isEIP158 ); err != nil {
171170 // something very wrong, should not happen
172171 log .Error ("merge slotDB failed" , "err" , err )
@@ -285,17 +284,14 @@ func (p *PEVMProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
285284 }(time .Now ())
286285 log .Debug ("pevm confirm" , "txIndex" , pr .txReq .txIndex )
287286 return p .confirmTxResult (statedb , gp , pr )
288- }, p .unorderedMerge && txDAG != nil )
287+ }, p .unorderedMerge )
289288 parallelRunDuration := time .Since (start ) - buildLevelsDuration
290289 if err != nil {
291290 tx := allTxs [txIndex ]
292291 log .Error ("ProcessParallel tx failed" , "txIndex" , txIndex , "txHash" , tx .Hash ().Hex (), "err" , err )
293292 return nil , nil , 0 , fmt .Errorf ("could not apply tx %d [%v]: %w" , txIndex , tx .Hash ().Hex (), err )
294293 }
295294
296- //fmt.Printf("ProcessParallel tx all done, parallelNum:%d, txNum: %d, conflictNum: %d, executeDuration:%s, confirmDurations:%s, buildLevelsDuration:%s, runDuration:%s\n",
297- // ParallelNum(), txNum, p.debugConflictRedoNum, time.Duration(executeDurations), time.Duration(confirmDurations), buildLevelsDuration, parallelRunDuration)
298-
299295 // len(commonTxs) could be 0, such as: https://bscscan.com/block/14580486
300296 var redoRate int = 0
301297 if len (p .commonTxs ) == 0 {
@@ -334,8 +330,8 @@ func (p *PEVMProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
334330 var cumulativeGasUsed uint64
335331 for _ , receipt := range p .receipts {
336332 // reset the log index
337- for _ , log := range receipt .Logs {
338- log .Index = uint (lindex )
333+ for _ , oneLog := range receipt .Logs {
334+ oneLog .Index = uint (lindex )
339335 lindex ++
340336 }
341337 // re-calculate the cumulativeGasUsed
0 commit comments