mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
a860648960
* remove all mentions * more changes * folder by folder Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
22 lines
653 B
Go
22 lines
653 B
Go
// Package db defines the ability to create a new database
|
|
// for an Ethereum Beacon Node.
|
|
package db
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/db/kv"
|
|
)
|
|
|
|
// NewDB initializes a new DB.
|
|
func NewDB(ctx context.Context, dirPath string, config *kv.Config) (Database, error) {
|
|
return kv.NewKVStore(ctx, dirPath, config)
|
|
}
|
|
|
|
// NewDBFilename uses the KVStoreDatafilePath so that if this layer of
|
|
// indirection between db.NewDB->kv.NewKVStore ever changes, it will be easy to remember
|
|
// to also change this filename indirection at the same time.
|
|
func NewDBFilename(dirPath string) string {
|
|
return kv.KVStoreDatafilePath(dirPath)
|
|
}
|