mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-07 11:32:20 +00:00
19 lines
401 B
Go
19 lines
401 B
Go
package utils
|
|
|
|
import (
|
|
"errors"
|
|
"os"
|
|
|
|
"github.com/ledgerwatch/erigon/ethdb"
|
|
)
|
|
|
|
var ErrUnsupported error = errors.New("unsupported KV type")
|
|
|
|
func RmTmpFiles(snapshotPath string) error {
|
|
return os.Remove(snapshotPath + "/mdbx.lck")
|
|
}
|
|
|
|
func OpenSnapshotKV(configsFunc ethdb.BucketConfigsFunc, path string) ethdb.RwKV {
|
|
return ethdb.NewMDBX().WithBucketsConfig(configsFunc).Path(path).MustOpen()
|
|
}
|