Merged
Conversation
…mp field. The only functional change is that each vote is now its own object rather than modifying an existing one.
…thing that's already tested above, signature correctness with respect to vote contents.
… and use these constants in tests.
thsfs
approved these changes
Nov 5, 2021
theohax
reviewed
Nov 5, 2021
| boost::transform_iterator<nano::iterate_vote_blocks_as_hash, nano::vote_blocks_vec_iter> end () const; | ||
| std::string to_json () const; | ||
| uint64_t timestamp () const; | ||
| static uint64_t constexpr timestamp_max = { 0xffff'ffff'ffff'ffffULL }; |
Contributor
There was a problem hiding this comment.
Would it be maybe any better to use the numeric limits?
Also, on a different note, is timestamp_m (the suffix _m) for member? I don't remember seeing it a lot.
Contributor
Author
There was a problem hiding this comment.
This number will be different with the actual vote duration changes.
theohax
approved these changes
Nov 5, 2021
dsiganos
approved these changes
Nov 5, 2021
| tree.put ("signature", signature.number ()); | ||
| tree.put ("sequence", std::to_string (timestamp)); | ||
| tree.put ("timestamp", std::to_string (timestamp)); | ||
| tree.put ("sequence", std::to_string (timestamp ())); |
Contributor
There was a problem hiding this comment.
Why are we writing both a sequence and a timestamp?
For backwards compatibility?
Contributor
Author
There was a problem hiding this comment.
Yes though we could probably remove sequence at this point.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 is the first commit related to #3453
It encapsulates the nano::vote::timestamp field and rewrites tests to use the encapsulated field.