mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-31 16:21:21 +00:00
integration: senders check that snapshots are not nil #3905
This commit is contained in:
parent
4419c23866
commit
f2a9763a6d
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user