nim-codex/tests/codex/sales
Eric 4c51dca299
feat(slot-reservations): Add SaleSlotReserving state (#917)
* convert EthersError to MarketError

* change `canReserveSlot` and `reserveSlot` parameters

Parameters for `canReserveSlot` and `reserveSlot` were changed from `SlotId` to `RequestId` and `UInt256 slotIndex`.

* Add SaleSlotReserving

Adds a new state, SaleSlotReserving, that attempts to reserve a slot before downloading.
If the slot cannot be reserved, the state moves to SaleIgnored.
On error, the state moves to SaleErrored.

SaleIgnored is also updated to pass in `reprocessSlot` and `returnBytes`, controlling the behaviour in the Sales module after the slot is ignored. This is because previously it was assumed that SaleIgnored was only reached when there was no Availability. This is no longer the case, since SaleIgnored can now be reached when a slot cannot be reserved.

* Update SalePreparing

Specify `reprocessSlot` and `returnBytes` when moving to `SaleIgnored` from `SalePreparing`.

Update tests to include test for a raised CatchableError.

* Fix unit test

* Modify `canReserveSlot` and `reverseSlot` params after rebase

* Update MockMarket with new `canReserveSlot` and `reserveSlot` params

* fix after rebase

also bump codex-contracts-eth to master
2024-10-04 06:16:11 +00:00
..
helpers Wire up prover (#736) 2024-03-12 12:10:14 +00:00
states feat(slot-reservations): Add SaleSlotReserving state (#917) 2024-10-04 06:16:11 +00:00
testreservations.nim Block deletion with ref count & repostore refactor (#631) 2024-06-20 22:46:06 +00:00
testsales.nim Chronos v4 Update (v3 Compat Mode) (#814) 2024-07-18 21:04:33 +00:00
testsalesagent.nim feat: expiry specified with number of seconds (#793) 2024-05-06 17:35:46 +02:00
testslotqueue.nim Chronos v4 Update (v3 Compat Mode) (#814) 2024-07-18 21:04:33 +00:00
teststates.nim feat(slot-reservations): Add SaleSlotReserving state (#917) 2024-10-04 06:16:11 +00:00