mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-24 20:47:16 +00:00
save
This commit is contained in:
parent
69ae7dcad9
commit
ad866187e2
@ -768,6 +768,23 @@ func DumpBodies(ctx context.Context, db kv.RoDB, segmentFilePath, tmpDir string,
|
||||
if err := f.Compress(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
d, err := compress.NewDecompressor(segmentFilePath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer d.Close()
|
||||
var buf []byte
|
||||
if err := d.WithReadAhead(func() error {
|
||||
g := d.MakeGetter()
|
||||
for g.HasNext() {
|
||||
buf, _ = g.Next(buf)
|
||||
}
|
||||
return nil
|
||||
}); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user