Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refund timestamps overwrite each other #1

Open
JackDiSalvatore opened this issue Sep 8, 2018 · 0 comments
Open

Refund timestamps overwrite each other #1

JackDiSalvatore opened this issue Sep 8, 2018 · 0 comments

Comments

@JackDiSalvatore
Copy link
Contributor

JIRA | HPP-24

Currently “unstaking” holds all the refunds in one row of the table. When a stake is unstaked a refund is created with the amount of HORUS from the stake and a timestamp. A deferred transaction is also created to send the “refundhorus” action. The refund action will make sure that 7 days has past since the refund timestamp.

When a second stake is unstaked during the wait time of the first stake, it will update the refund timestamp to the current time. The problem is that this will overwrite the the first timestamp causing the refundhorus deferred transaction to fail. The second deferred transaction from the second unstake should succeed and refund both the first and second stake. But this makes the user wait to get all unstakes at once for the longest wait time.

A fix is to create a new refund row for each unstake with their own independent time stamps. Then update the refund action to search by refund row id and check each time stamp separately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant