-
Notifications
You must be signed in to change notification settings - Fork 284
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
namestate: improve "stats" object for transfers, expiry and revoke #555
Conversation
This comment has been minimized.
This comment has been minimized.
e9627fd
to
b7a50a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it okay to have negative numbers in blocksUntilExpire ? (Maybe have better alias if we want to keep this for backwards compatibility reasons)
...and then the stats should switch to "blocksSinceExpired".
I just realized hsd has never reported expiration date correctly for reserved names. A reserved name does not expire until AFTER the reserved name period if over (four years). The logic can be seen in hsd/lib/covenants/namestate.js Lines 208 to 218 in 107ed2b
(note the typo in the comment, line 212 should say "two years") However, this API tells me that the reserved name
|
Fixed expire date as it needs to be: Max(claimPeriodEnd, normal end). If claimed name has been transferred or renewed, it wont expire on claim period end, instead when it should normally expire. But if it has not been transfer/renewed then it will expire on claimPeriod end. |
Adds an expired state to the "stats" object, refactors the
toStats()
method in namestate.js.