nim-codex/codex/sales
Eric Mastro 92dc770fa2
[marketplace] check randomly assigned slot index is not already filled
When a storage request is handled by the sales module, a slot index was randomly assigned and then the slot was filled.

Now, the random slot index is checked that its state is `SlotState.Free` before continuing with the download process.

An additional sales agent state was added, preparing, that handles this step of assigning a random slot index. All state machine setup, such as retrieving the request and subscribing to events that were previously in the `SaleDownloading` state have been moved to `SalePreparing`. If all indices of the request have been filled, the state is changed to `SaleIgnored`.

# Conflicts:
#	codex/sales.nim
#	codex/sales/states/downloading.nim
#	codex/sales/states/filling.nim
#	tests/contracts/testInteractions.nim
2023-05-08 10:38:58 +10:00
..
states [marketplace] check randomly assigned slot index is not already filled 2023-05-08 10:38:58 +10:00
reservations.nim feat: collateral per slot (#390) 2023-04-14 11:04:17 +02:00
salesagent.nim [marketplace] check randomly assigned slot index is not already filled 2023-05-08 10:38:58 +10:00
salescontext.nim [marketplace] Add Reservations Module (#340) 2023-04-04 17:05:16 +10:00
salesdata.nim [marketplace] check randomly assigned slot index is not already filled 2023-05-08 10:38:58 +10:00
statemachine.nim [marketplace] Add Reservations Module (#340) 2023-04-04 17:05:16 +10:00