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

multi: Update revoked tickets to expired/missed. #415

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

jholdstock
Copy link
Member

@jholdstock jholdstock commented Aug 26, 2023

Any tickets in the database which are currently revoked should be updated to either expired or missed.

This is achieved with a heuristic based on the expiry height and revoke height of the tickets. It is not guaranteed to be 100% correct but should be pretty close.

The web api is not yet updated to reflect this change, missed/expired tickets will continue to be counted as revoked.

Contributes to #268

Any tickets in the database which are currently revoked should be
updated to either expired or missed.

This is achieved with a heuristic based on the expiry height and
revoke height of the tickets. It is not guaranteed to be 100% correct
but should be pretty close.

The web api is not yet updated to reflect this change, missed/expired
tickets will continue to be counted as revoked.
return nil
}

v.log.Warnf("Updating %s in revoked status, this may take a while...",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding context for "this may take a while", on my testnet VSP

[WRN] VSP: Updating 231 tickets in revoked status, this may take a while...
[DBG] VSP: Scanning 109113 blocks for 231 spent tickets
[INF] VSP: Took 36.742324728s

Copy link
Member

@davecgh davecgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Untested, but I don't see any issues. The heuristic is as we previously discussed and the upgrade logic looks correct.

@jholdstock jholdstock merged commit a52034c into decred:master Aug 29, 2023
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

Successfully merging this pull request may close these issues.

2 participants