mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 17:44:29 +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)
|
s := stage(sync, tx, nil, stages.Senders)
|
||||||
log.Info("Stage", "name", s.ID, "progress", s.BlockNumber)
|
log.Info("Stage", "name", s.ID, "progress", s.BlockNumber)
|
||||||
|
|
||||||
|
var br *snapshotsync.BlockRetire
|
||||||
snapshots := allSnapshots(chainConfig)
|
snapshots := allSnapshots(chainConfig)
|
||||||
d, err := dir.OpenRw(snapshots.Dir())
|
if snapshots != nil {
|
||||||
if err != nil {
|
d, err := dir.OpenRw(snapshots.Dir())
|
||||||
return err
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
br = snapshotsync.NewBlockRetire(runtime.NumCPU(), tmpdir, snapshots, d, db, nil, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
pm, err := prune.Get(tx)
|
pm, err := prune.Get(tx)
|
||||||
@ -587,7 +591,7 @@ func stageSenders(db kv.RwDB, ctx context.Context) error {
|
|||||||
return err
|
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 {
|
if unwind > 0 {
|
||||||
u := sync.NewUnwindState(stages.Senders, s.BlockNumber-unwind, s.BlockNumber)
|
u := sync.NewUnwindState(stages.Senders, s.BlockNumber-unwind, s.BlockNumber)
|
||||||
if err = stagedsync.UnwindSendersStage(u, tx, cfg, ctx); err != nil {
|
if err = stagedsync.UnwindSendersStage(u, tx, cfg, ctx); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user