mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-06 01:32:18 +00:00
035d0fb669
Former-commit-id: 44c0c5682c0296d94943b354171e69b4c8cf5312 [formerly 54da5cb45b098f0737fb3c37964e612dfe93c751] Former-commit-id: 5d84d3c5038a01c4108e519d5a5c69033ace8ae2
18 lines
589 B
Go
18 lines
589 B
Go
// Package database provides several constructs including a simple in-memory database.
|
|
// This should not be used for production, but would be a helpful interim
|
|
// solution for development.
|
|
package database
|
|
|
|
import (
|
|
"path/filepath"
|
|
|
|
"github.com/ethereum/go-ethereum/ethdb"
|
|
)
|
|
|
|
// NewShardDB initializes a shardDB that writes to local disk.
|
|
func NewShardDB(dataDir string, name string) (ethdb.Database, error) {
|
|
// Uses default cache and handles values.
|
|
// TODO: allow these arguments to be set based on cli context.
|
|
return ethdb.NewLDBDatabase(filepath.Join(dataDir, name), 16, 16)
|
|
}
|