oxen-io / eth-sn-contracts

4 stars 8 forks source link

Ensure withdraw preserves reseveration info #88

Closed Doy-lee closed 2 weeks ago

Doy-lee commented 2 weeks ago

Withdraw from a contributor used to be non-resettable because when a reservation is fulfilled it was deleted from the contract which meant when a contributor left they lost their slot and potentially causes pre-existing contributors to fail the minimum reservation checks.

To handle this I've added an additional flag to the reservation called received which remembers if the contribution was made which allows us to keep around the reservation information. Goes ontop of https://github.com/oxen-io/eth-sn-contracts/pull/87 and includes a bunch of updated tests to check that it's working.