-
Notifications
You must be signed in to change notification settings - Fork 73
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
Added leap-util subcommand to check for a clean shutdown #914
Conversation
if(dbheader->dirty) { | ||
std::cout << "Database dirty flag is set, shutdown was not clean" << std::endl; | ||
return -1; | ||
} |
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.
Should check that dbheader's header_id
is expected value, as it's possible the format will change in the future
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.
thank you, done
Can you add to the PR description details about the new option and an example of the output. |
This PR adds command line option to leap-util to indicate if the last shutdown was clean or not. This would allow someone to better control logic about perhaps automatically starting from snapshot if the state database was crashed.
Examples of use:
Successful check with default state location:
Unsuccessful check with custom state path:
After nodeos was killed with -9: