LMDB: create db dir

This commit is contained in:
Ștefan Talpalaru 2020-01-20 13:09:43 +01:00 committed by tersec
parent 7113259137
commit 14e1e3af52
1 changed files with 1 additions and 0 deletions

View File

@ -142,6 +142,7 @@ proc init*(T: type LmdbStoreRef, basePath: string, readOnly = false): T =
if (let x = mdb_env_create(env); x != 0):
raiseLmdbError(x)
createDir(basePath)
let dataDir = basePath / "nimbus.lmdb"
if (let x = mdb_env_set_mapsize(env, LMDB_MAP_SIZE); x != 0):