codex-storage / codex-contracts-eth

Ethereum smart contracts for Codex
Other
6 stars 9 forks source link

Check that `maxSlotLoss` is not bigger then `slots` #139

Closed AuHau closed 2 months ago

AuHau commented 2 months ago

There should be this check in fillSlot: https://github.com/codex-storage/codex-contracts-eth/blob/master/contracts/Marketplace.sol#L113

0x-r4bbit commented 2 months ago

Addressed in https://github.com/codex-storage/codex-contracts-eth/pull/140, however @AuHau I believe the check has to happen in requestStorage and not in fillSlot.

We don't want this incorrect state to enter the system in the first place.

AuHau commented 2 months ago

Yeah, you are right ;-) Thanks!