Skip to content

Commit

Permalink
fix localStore lifecycle for testDatasampler starter
Browse files Browse the repository at this point in the history
  • Loading branch information
benbierens committed Jan 8, 2024
1 parent c6942d4 commit 199f4df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 27 deletions.
3 changes: 2 additions & 1 deletion tests/codex/proof/testdatasamplerstarter.nim
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ asyncchecksuite "Test datasampler starter":
numberOfSlotBlocks = 4
totalNumberOfSlots = 2
datasetSlotIndex = 1
localStore = CacheStore.new()

var
localStore: CacheStore
manifest: Manifest
manifestBlock: bt.Block
slot: Slot
Expand Down Expand Up @@ -158,6 +158,7 @@ asyncchecksuite "Test datasampler starter":
)

setup:
localStore = CacheStore.new()
await createDatasetBlocks()
await createDatasetRootHashAndSlotTree()
await createManifest()
Expand Down
25 changes: 0 additions & 25 deletions tests/codex/proof/testslotblocks.nim
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,6 @@ let
numberOfSlotBlocks = 4
datasetSlotIndex = 3

# asyncchecksuite "Test slotblocks - manifest":
# let
# localStore = CacheStore.new()
# manifest = Manifest.new(
# treeCid = Cid.example,
# blockSize = 1.MiBs,
# datasetSize = 100.MiBs)

# var
# manifestBlock = bt.Block.new(manifest.encode().tryGet(), codec = ManifestCodec).tryGet()
# slot = Slot(
# request: StorageRequest(
# ask: StorageAsk(
# slotSize: u256(bytesPerBlock * numberOfSlotBlocks)
# ),
# content: StorageContent(
# cid: $manifestBlock.cid
# ),
# ),
# slotIndex: u256(datasetSlotIndex)
# )

# setup:
# discard await localStore.putBlock(manifestBlock)

asyncchecksuite "Test slotblocks - slot blocks by index":
let
# The number of slot blocks and number of slots, combined with
Expand Down
5 changes: 4 additions & 1 deletion tests/codex/sales/teststates.nim
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import ./states/testfinished
import ./states/testinitialproving
import ./states/testfilled
import ./states/testproving
import ./states/testsimulatedproving

import pkg/codex/conf
when codex_enable_proof_failures:
import ./states/testsimulatedproving

{.warning[UnusedImport]: off.}

0 comments on commit 199f4df

Please sign in to comment.