-
Notifications
You must be signed in to change notification settings - Fork 10
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
[1.0-beta4] Add max-reversible-blocks option #493
Conversation
I think it might be a good idea to allow the user to disable the check with |
The name is a bit misleading. It is not really |
It is not that either. It is |
Not quite, it is used in |
Correct, in that case it could be any branch. |
So really we cannot create any branch longer than I feel that |
The description is |
Sounds good, thanks! |
Discussed with team and decided to tie the implementation to |
@@ -360,7 +360,7 @@ void chain_plugin::set_program_options(options_description& cli, options_descrip | |||
#endif | |||
("enable-account-queries", bpo::value<bool>()->default_value(false), "enable queries to find accounts by various metadata.") | |||
("max-reversible-blocks", bpo::value<uint32_t>()->default_value(config::default_max_reversible_blocks), | |||
"Approximate maximum allowed reversible blocks before shutdown. Will shut down if limit reached.") | |||
"Approximate maximum allowed reversible blocks before shutdown. Will shut down if limit reached. Specify 0 to disable.") |
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 don't see where you set it to an internal big number to disable if the user configures it to 0.
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.
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.
Now that I'm not adding the value to reversible_block_num
, might be nicer to just set it to std::numeric_limits<uint32_t>::max()
if 0
.
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.
Ah, but the if > 0
does avoid the mutex if that has any worth. I guess I'll leave it as is.
Note:start |
New
chain_plugin
optionmax-reversible-blocks
. Specifies the maximum number of reversible blocks beyond current LIB to allow before the node is gracefully shutdown. The graceful shutdown is provided as a way to prevent out of memory kill by OS. Once consensus is working again the node can be started with a largermax-reversible-blocks
value to continue.Resolves #447