codex-storage / codex-contracts-eth

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

feat: expiry specified as duration #99

Closed AuHau closed 5 months ago

AuHau commented 5 months ago

This is part of the work on fixing https://github.com/codex-storage/nim-codex/issues/766.

Not completely sure why the expiry was designed in this way where a timestamp was passed, while duration is computed as now + duration interval. Originally for the fix mentioned above, I thought I would do this computation in nim-codex but I ran into a clock syncing issue in tests, so I have instead decided to do a proper fix with unifying the "time computation" in the smart contracts for expiry and duration in the same way.