-
Notifications
You must be signed in to change notification settings - Fork 15
spring-util command to print snapshot info #1237
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
Conversation
("head_block_id", head_block) | ||
("head_block_num", block_header::num_from_id(head_block)) | ||
("head_block_time", head_block_time)) | ||
<< std::endl; |
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.
I think that code should be in snapshot.hpp
or snapshot_detail.hpp
so that the snapshot format details are not spread out in too many places.
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.
It won't be too hard to create a get_snapshot_info()
call in those files returning some sort of snapshot_info
struct. Any more commonization between snapshot loading and getting snapshot info might be rather invasive.
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.
Or even just return a mutable_variant to keep it flexible.
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.
Yes, that's exactly what I was thinking of.
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.
okay I've moved the stuff that generates the MVO in to snapshot.hpp/cpp. Also added tests a few days ago. Moving out of draft.
Note:start |
Adds a command to
spring-util
that prints basic information about a snapshot in JSON.