mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-28 14:47:16 +00:00
erigon3: cli command to force merge snapshots (#672)
This commit is contained in:
parent
1ce5610eea
commit
91cc20a34b
@ -280,6 +280,15 @@ func (a *Aggregator22) buildFilesInBackground(step uint64, collation Agg22Collat
|
||||
}()
|
||||
a.integrateFiles(sf, step*a.aggregationStep, (step+1)*a.aggregationStep)
|
||||
log.Info("[snapshots] history build done", "step", fmt.Sprintf("%d-%d", step, step+1))
|
||||
if err := a.Merge(); err != nil {
|
||||
return nil
|
||||
}
|
||||
closeAll = false
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *Aggregator22) Merge() error {
|
||||
closeAll := true
|
||||
maxSpan := uint64(32) * a.aggregationStep
|
||||
for r := a.findMergeRange(a.maxTxNum.Load(), maxSpan); r.any(); r = a.findMergeRange(a.maxTxNum.Load(), maxSpan) {
|
||||
outs := a.staticFilesInRange(r)
|
||||
@ -302,7 +311,6 @@ func (a *Aggregator22) buildFilesInBackground(step uint64, collation Agg22Collat
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
closeAll = false
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user