-
Notifications
You must be signed in to change notification settings - Fork 72
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 load of fork database after instant-finality is enabled #2113
Conversation
…ant-finality. GH-2083 Moved mutex out of fork database impl so it can protect transition from legacy to instant-finality.
* as well as switching from legacy to instant-finality. | ||
*/ | ||
class fork_database { | ||
mutable std::recursive_mutex m; |
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'm not a fan of recursive mutexes. However, currently controller uses nested calls of fork_database.apply
. We can look at refactoring those so that no apply
calls functions which also calls apply
but that will take some work.
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.
Nice change. I'm really glad we got rid of block_data, this is much nicer.
}}, v); | ||
} | ||
|
||
// if we every support more than one version then need to save min/max in fork_database_t |
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.
Comment doesn't read right. Maybe this
// if we every support more than one version then need to save min/max in fork_database_t | |
// if we ever support more than one version, then we need to save min/max in fork_database_t |
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.
Like the restructuring.
@@ -7,6 +7,11 @@ | |||
|
|||
namespace eosio::chain { | |||
|
|||
// moved this warning out of header so it only uses once | |||
#warning TDDO https://github.com/AntelopeIO/leap/issues/2080 |
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 it occurs to me, if we already have an issue, we don't need a warning, because the issue will remind us.
Note:start |
…-persist-if-fork-db
…ap into GH-2048_whitespace
IF - addon to PR 2113 - Whitespace change to avoid very long lines.
fork_database
in legacy and after instant-finality is activated.fork_database
to protect transition of impl from legacy to instant finality.controller::head
which was incontroller block_data_gen_t::head
tofork_database_t::chain_head
block_data_gen_t
andblock_data_t
Resolves #2048
Resolves #2083