todo: remove dependency from blockstoremanage to conf.
This commit is contained in:
parent
303e435ec4
commit
cc97010898
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
import std/sequtils
|
import std/sequtils
|
||||||
import std/os
|
import std/os
|
||||||
import std/tables
|
|
||||||
|
|
||||||
import pkg/chronicles
|
import pkg/chronicles
|
||||||
import pkg/chronos
|
import pkg/chronos
|
||||||
|
@ -26,6 +25,7 @@ import ./node
|
||||||
import ./conf
|
import ./conf
|
||||||
import ./rng
|
import ./rng
|
||||||
import ./rest/api
|
import ./rest/api
|
||||||
|
import ./stores
|
||||||
import ./stores/blockstoremanager
|
import ./stores/blockstoremanager
|
||||||
import ./blockexchange
|
import ./blockexchange
|
||||||
import ./utils/fileutils
|
import ./utils/fileutils
|
||||||
|
|
|
@ -7,13 +7,9 @@
|
||||||
## This file may not be copied, modified, or distributed except according to
|
## This file may not be copied, modified, or distributed except according to
|
||||||
## those terms.
|
## those terms.
|
||||||
|
|
||||||
import pkg/upraises
|
|
||||||
|
|
||||||
push: {.upraises: [].}
|
|
||||||
import std/os
|
import std/os
|
||||||
|
|
||||||
import pkg/chronos
|
import pkg/chronos
|
||||||
import pkg/chronicles
|
|
||||||
import pkg/datastore
|
import pkg/datastore
|
||||||
import pkg/confutils
|
import pkg/confutils
|
||||||
import pkg/confutils/defs
|
import pkg/confutils/defs
|
||||||
|
@ -62,7 +58,7 @@ proc getBlockStore(repoStore: RepoStore, config: CodexConf): BlockStore =
|
||||||
return CacheStore.new(backingStore = repoStore, cacheSize = config.cacheSize * MiB)
|
return CacheStore.new(backingStore = repoStore, cacheSize = config.cacheSize * MiB)
|
||||||
return repoStore
|
return repoStore
|
||||||
|
|
||||||
func new*(T: type BlockStoreManager, config: CodexConf): T =
|
proc new*(T: type BlockStoreManager, config: CodexConf): T =
|
||||||
let
|
let
|
||||||
repoStore = createRepoStore(config)
|
repoStore = createRepoStore(config)
|
||||||
maintenance = createMaintenance(repoStore, config)
|
maintenance = createMaintenance(repoStore, config)
|
||||||
|
|
Loading…
Reference in New Issue