[build] update nim-datastore
also make changes to `codex/codex.nim` and tests for SQLiteStore re: changes in nim-datastore closes #178
This commit is contained in:
parent
097a4cfd67
commit
5aa42541b3
|
@ -133,7 +133,15 @@ proc new*(T: type CodexServer, config: CodexConf): T =
|
|||
|
||||
wallet = WalletRef.new(EthPrivateKey.random())
|
||||
network = BlockExcNetwork.new(switch)
|
||||
localStore = SQLiteStore.new(config.dataDir / "repo", cache = cache)
|
||||
repoDir = config.dataDir / "repo"
|
||||
|
||||
if io2.createPath(repoDir).isErr:
|
||||
trace "Unable to create data directory for block store", dataDir = repoDir
|
||||
raise (ref Defect)(
|
||||
msg: "Unable to create data directory for block store: " & repoDir)
|
||||
|
||||
let
|
||||
localStore = SQLiteStore.new(repoDir, cache = cache)
|
||||
peerStore = PeerCtxStore.new()
|
||||
pendingBlocks = PendingBlocksManager.new()
|
||||
discovery = DiscoveryEngine.new(localStore, peerStore, network, blockDiscovery, pendingBlocks)
|
||||
|
|
|
@ -38,6 +38,7 @@ proc runSuite(cache: bool) =
|
|||
setup:
|
||||
removeDir(repoDir)
|
||||
require(not dirExists(repoDir))
|
||||
createDir(repoDir)
|
||||
|
||||
if cache:
|
||||
store = SQLiteStore.new(repoDir)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit d5d986c0140a46e957d9a88df40b7ce7dad424f3
|
||||
Subproject commit 2769ce1de21e595e712fd1df7a195c34cd5d18de
|
Loading…
Reference in New Issue