Skip to content

Commit 15991d8

Browse files
committed
limit amount of slot queue workers to 1
reason: proof generation does not happen in separate threads yet, so to avoid taking too long to provide initial storage proofs we only pick up one slot at a time
1 parent 0410f99 commit 15991d8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

codex/sales/slotqueue.nim

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ type
5858
QueueNotRunningError* = object of SlotQueueError
5959

6060
# Number of concurrent workers used for processing SlotQueueItems
61-
const DefaultMaxWorkers = 3
61+
const DefaultMaxWorkers = 1
6262

6363
# Cap slot queue size to prevent unbounded growth and make sifting more
6464
# efficient. Max size is not equivalent to the number of slots a host can

tests/codex/sales/testsales.nim

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ asyncchecksuite "Sales":
311311
createAvailability() # enough to fill a single slot
312312
await market.requestStorage(request)
313313
let items = SlotQueueItem.init(request)
314-
await sleepAsync(10.millis) # queue starts paused, allow items to be added to the queue
314+
await allowRequestToStart()
315315
check eventually queue.paused
316316
# The first processed item/slot will be filled (eventually). Subsequent
317317
# items will be processed and eventually re-pushed with `seen = true`. Once

0 commit comments

Comments
 (0)