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.
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, whileduration
is computed asnow + duration interval
. Originally for the fix mentioned above, I thought I would do this computation innim-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.