Skip to content

Commit

Permalink
Update MockMarket with new canReserveSlot and reserveSlot params
Browse files Browse the repository at this point in the history
  • Loading branch information
emizzle committed Sep 26, 2024
1 parent 6264f70 commit 3c207c6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/codex/helpers/mockmarket.nim
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,19 @@ method canProofBeMarkedAsMissing*(market: MockMarket,
period: Period): Future[bool] {.async.} =
return market.canBeMarkedAsMissing.contains(id)

method reserveSlot*(market: MockMarket, id: SlotId) {.async.} =
method reserveSlot*(
market: MockMarket,
requestId: RequestId,
slotIndex: UInt256) {.async.} =

Check warning on line 311 in tests/codex/helpers/mockmarket.nim

View check run for this annotation

Codecov / codecov/patch

tests/codex/helpers/mockmarket.nim#L311

Added line #L311 was not covered by tests

if error =? market.reserveSlotThrowError:
raise error

method canReserveSlot*(market: MockMarket, id: SlotId): Future[bool] {.async.} =
method canReserveSlot*(
market: MockMarket,
requestId: RequestId,
slotIndex: UInt256): Future[bool] {.async.} =

return market.canReserveSlot

func setCanReserveSlot*(market: MockMarket, canReserveSlot: bool) =
Expand Down

0 comments on commit 3c207c6

Please sign in to comment.