Skip to content

Commit 0aeb51d

Browse files
committed
save
1 parent ff85526 commit 0aeb51d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

execution/execmodule/ethereum_execution.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,17 @@ func (e *EthereumExecutionModule) unwindToCommonCanonical(sd *execctx.SharedDoma
309309
}
310310
}
311311

312+
n := currentHeader.Number.Uint64()
313+
randomNumber, _ := math.RandInt64()
314+
if randomNumber%2 == 0 {
315+
n--
316+
}
317+
312318
if err := e.hook.BeforeRun(tx, true); err != nil {
313319
return err
314320
}
315321

316-
if err := e.executionPipeline.UnwindTo(currentHeader.Number.Uint64(), stagedsync.ExecUnwind, tx); err != nil {
322+
if err := e.executionPipeline.UnwindTo(n, stagedsync.ExecUnwind, tx); err != nil {
317323
return err
318324
}
319325
if err := e.executionPipeline.RunUnwind(sd, tx); err != nil {

execution/stagedsync/exec3.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ func ExecV3(ctx context.Context,
129129
if execStage.state.unwindPoint != nil {
130130
fmt.Println("unwindPoint", *execStage.state.unwindPoint)
131131
}
132+
132133
if execStage.state.prevUnwindPoint != nil {
133134
fmt.Println("previousUnwindPoint", *execStage.state.prevUnwindPoint)
134135
}

0 commit comments

Comments
 (0)