mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 12:07:17 +00:00
bor: ensure db exists
This commit is contained in:
parent
e5081c78b9
commit
863db147cf
@ -262,14 +262,14 @@ func RemoteServices(ctx context.Context, cfg Flags, logger log.Logger, rootCance
|
||||
borDbPath := path.Join(cfg.Datadir, "bor")
|
||||
{
|
||||
// ensure db exist
|
||||
tmpDb, err := kv2.NewMDBX(logger).Path(borDbPath).Open()
|
||||
tmpDb, err := kv2.NewMDBX(logger).Path(borDbPath).Label(kv.ConsensusDB).Open()
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, nil, nil, nil, nil, err
|
||||
}
|
||||
tmpDb.Close()
|
||||
}
|
||||
log.Trace("Creating consensus db", "path", borDbPath)
|
||||
borKv, err = kv2.NewMDBX(logger).Path(borDbPath).Readonly().Open()
|
||||
borKv, err = kv2.NewMDBX(logger).Path(borDbPath).Label(kv.ConsensusDB).Readonly().Open()
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, nil, nil, nil, nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user