multi: Add timestamp to ticket vote. #1395
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This diff adds a unix timestamp to the cast vote details that is saved
to disk when a ticket vote is cast.
The timestamp was not included in the git backend ticket votes because
the git backend only flushed the vote journals once per hour. This means
that you could only determine if a vote was cast within a +/- 60 minute
period. Adding the timestamp to the vote would have provided granular
details that could be used to correlate blocks of votes to their owner.
This argument does not apply to the tstore backend because tlog already
provides a granular timestamp for each vote leaf. Since the data is
already public it should be returned through the API so that clients
like dcrdata, who use the data to construct vote graphs, do not need to
walk the tlog tree manually in order to parse the timestamp.