From cc97010898e379ee87be5bfe4ba17d0fe07e5230 Mon Sep 17 00:00:00 2001 From: benbierens Date: Tue, 14 Mar 2023 11:32:53 +0100 Subject: [PATCH] todo: remove dependency from blockstoremanage to conf. --- codex/codex.nim | 2 +- codex/stores/blockstoremanager.nim | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/codex/codex.nim b/codex/codex.nim index 41b9660f..7e39c3e0 100644 --- a/codex/codex.nim +++ b/codex/codex.nim @@ -9,7 +9,6 @@ import std/sequtils import std/os -import std/tables import pkg/chronicles import pkg/chronos @@ -26,6 +25,7 @@ import ./node import ./conf import ./rng import ./rest/api +import ./stores import ./stores/blockstoremanager import ./blockexchange import ./utils/fileutils diff --git a/codex/stores/blockstoremanager.nim b/codex/stores/blockstoremanager.nim index fca8ffae..88df5770 100644 --- a/codex/stores/blockstoremanager.nim +++ b/codex/stores/blockstoremanager.nim @@ -7,13 +7,9 @@ ## This file may not be copied, modified, or distributed except according to ## those terms. -import pkg/upraises - -push: {.upraises: [].} import std/os import pkg/chronos -import pkg/chronicles import pkg/datastore import pkg/confutils 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 repoStore -func new*(T: type BlockStoreManager, config: CodexConf): T = +proc new*(T: type BlockStoreManager, config: CodexConf): T = let repoStore = createRepoStore(config) maintenance = createMaintenance(repoStore, config)