diff --git a/cmd/integration/commands/stages.go b/cmd/integration/commands/stages.go index a35c9dd0e..dea4d11ff 100644 --- a/cmd/integration/commands/stages.go +++ b/cmd/integration/commands/stages.go @@ -576,10 +576,14 @@ func stageSenders(db kv.RwDB, ctx context.Context) error { s := stage(sync, tx, nil, stages.Senders) log.Info("Stage", "name", s.ID, "progress", s.BlockNumber) + var br *snapshotsync.BlockRetire snapshots := allSnapshots(chainConfig) - d, err := dir.OpenRw(snapshots.Dir()) - if err != nil { - return err + if snapshots != nil { + d, err := dir.OpenRw(snapshots.Dir()) + if err != nil { + return err + } + br = snapshotsync.NewBlockRetire(runtime.NumCPU(), tmpdir, snapshots, d, db, nil, nil) } pm, err := prune.Get(tx) @@ -587,7 +591,7 @@ func stageSenders(db kv.RwDB, ctx context.Context) error { return err } - cfg := stagedsync.StageSendersCfg(db, chainConfig, tmpdir, pm, snapshotsync.NewBlockRetire(runtime.NumCPU(), tmpdir, snapshots, d, db, nil, nil)) + cfg := stagedsync.StageSendersCfg(db, chainConfig, tmpdir, pm, br) if unwind > 0 { u := sync.NewUnwindState(stages.Senders, s.BlockNumber-unwind, s.BlockNumber) if err = stagedsync.UnwindSendersStage(u, tx, cfg, ctx); err != nil {