forked from TrueCloudLab/neoneo-go
core: return error for unknown storage configuration
This commit is contained in:
parent
35edc26193
commit
fdf73597af
1 changed files with 3 additions and 0 deletions
|
@ -3,6 +3,7 @@ package storage
|
|||
import (
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// KeyPrefix constants.
|
||||
|
@ -91,6 +92,8 @@ func NewStore(cfg DBConfiguration) (Store, error) {
|
|||
store, err = NewBoltDBStore(cfg.BoltDBOptions)
|
||||
case "badgerdb":
|
||||
store, err = NewBadgerDBStore(cfg.BadgerDBOptions)
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown storage: %s", cfg.Type)
|
||||
}
|
||||
return store, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue