mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-24 20:37:17 +00:00
36b6a71af4
* add flag to beacon and validator * gaz * fuzz * add dep viz * add to tools
19 lines
428 B
Go
19 lines
428 B
Go
// +build kafka_enabled
|
|
|
|
package db
|
|
|
|
import (
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/db/kafka"
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/db/kv"
|
|
)
|
|
|
|
// NewDB initializes a new DB with kafka wrapper.
|
|
func NewDB(dirPath string, stateSummaryCache *kv.stateSummaryCache) (Database, error) {
|
|
db, err := kv.NewKVStore(dirPath, stateSummaryCache, &kv.Config{})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return kafka.Wrap(db)
|
|
}
|