[#1809] node: Do not boot up if metabase is outdated

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-09-21 23:57:46 +03:00 committed by fyrchik
parent 8b3b16fe62
commit 4eb0ed11f8
4 changed files with 14 additions and 1 deletions

View file

@ -58,6 +58,8 @@ func (db *DB) Open(readOnly bool) error {
// Init initializes metabase. It creates static (CID-independent) buckets in underlying BoltDB instance.
//
// Returns ErrOutdatedVersion if a database at the provided path is outdated.
//
// Does nothing if metabase has already been initialized and filled. To roll back the database to its initial state,
// use Reset.
func (db *DB) Init() error {