Fix EphemeralAccountExpiry
MERGE REQUEST
Overview
In the upgrade of EphemeralAccountExpiry, where we moved it from being an uint64
to a time.Duration
, we did not add compat code that properly updates this field in the host's persistence object to be expressed in nanoseconds. The EphemeralAccountExpiry
field, expressed in seconds, is now being interpreted in nanoseconds.
This leads to a memory leak in the host where accounts essentially never expire. They do not expire because an expiry of 0 is treated as infinity, and the default expiry, rounded to seconds, yields zero.
This MR adds compat code that corrects this behavior, it will reset the EphemeralAccountExpiry
to the default for all host that either left the field unaltered or have not explicitly set it to zero.
Example for Visual Changes
Checklist
Review and complete the checklist to ensure that the MR is complete before assigned to an approver.
-
All new methods or updated methods have clear docstrings -
Testing added or updated for new methods -
Any new packages are added to Makefile and .gitlab-ci.yml -
API documentation updated for API updates -
Module README.md updated for changes to workflow -
Issue added to Sia-UI repo for new supporting features -
Changelog File Created
Issues Closed
Closes #4330 (closed)