-
Notifications
You must be signed in to change notification settings - Fork 68
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
IF: Support replay over instant finality transition #2287
Conversation
Moved transition of block_state_legacy to block_state to controller out of fork_database. Changed some fork_db.apply to chain_header apply where fork_db will not be available during replay.
…t_t to include_root_t
Note:start |
@@ -666,15 +670,15 @@ namespace eosio::chain { | |||
|
|||
template<class BSP> | |||
BSP fork_database_t<BSP>::get_block(const block_id_type& id, | |||
check_root_t check_root /* = check_root_t::no */) const { | |||
include_root_t include_root /* = include_root_t::no */) const { |
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.
Remove the /* = include_root_t::no */
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.
Why? It provides doc on what the default is.
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.
Oh, I thought include_root
was not a parameter with a default value. Don't make any changes for this PR. In general, should we stay away from default parameters?
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.
In general, I'm not a fan of default parameters. Here I was just changing the name.
} | ||
|
||
template<class BSP> | ||
BSP fork_database_impl<BSP>::get_block_impl(const block_id_type& id, | ||
check_root_t check_root /* = check_root_t::no */) const { | ||
if( check_root == check_root_t::yes && root->id() == id ) { | ||
include_root_t include_root /* = include_root_t::no */) const { |
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.
Remove the /* = include_root_t::no */
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.
Why? It provides doc on what the default is.
complete_block
to hold ablock_handle
. This removes duplicate code and allows access to block_handle methods likeid()
without using fork database variant.Resolves #2141