mirror of
https://github.com/codex-storage/codex-contracts-eth.git
synced 2025-01-25 10:59:05 +00:00
a99827ed39
Reinstate the index mapping for `activeSlots`, however with a modified data structure. The main difference comes from a change in `mySlots`: it now requires a `RequestId` as a parameter (which can be obtained using `myRequests`. This allowed for the `activeSlots` mapping to be keyed on `RequestId`, which gives a mapping of `ActiveSlotId => EnumerableSet.Bytes32`. `ActiveSlotId` is a keccak hash of `address + activeSlotIdx`, which not only allows retrieval of all active slot ids per request, but also allows clearing of all active slot ids for a request by incrementing the `activeSlotIdx`. ``` requestId => [ keccak(address + activeSlotIdx) => EnumerableSet.Bytes32 ] ```