Skip to content

EA LastUsed

Peter-Jan Brone requested to merge 4181-ea-last-used into master

MERGE REQUEST

MR Guidelines

Overview

This MR adds a field to the accounts persistence object on the renter side, called lastUsed. It is a timestamp that reflects when the account was last used (successfully) to transact with the host. We need this for price gouging, if the renter has been inactive for a long period of time the host might have expired his account. If the host expired his account, it will look to the renter the host cheated him out of his balance, when this situation occurs, we need to check if the period of inactivity is reasonable in relation to the host's EA expiry timeout.

Note

Please review carefully as this MR contains compat code in order to upgrade successfully from accounts metadata v150 to v151.

Example for Visual Changes

N/A

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

N/A

Edited by Matthew Sevey

Merge request reports