-
Notifications
You must be signed in to change notification settings - Fork 39
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
Fetch and store blocks between last grandpa and last beefy finalized #2202
Fetch and store blocks between last grandpa and last beefy finalized #2202
Conversation
c11e8ad
to
64076a8
Compare
7b05c57
to
d854bed
Compare
aa6237c
to
8c729bb
Compare
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.
Add docs and clang-format
@@ -161,6 +163,7 @@ namespace kagome::network { | |||
primitives::events::ChainSub chain_sub_; | |||
|
|||
std::optional<primitives::BlockNumber> beefy_genesis_; | |||
std::optional<primitives::BlockInfo> fetching_headers_; |
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.
not clear why field with plural name has optional type. Probably worth leaving a comment explaining the meaning
@@ -132,6 +134,7 @@ namespace kagome::network { | |||
outcome::result<void> apply( | |||
consensus::beefy::SignedCommitment justification, bool broadcast); | |||
outcome::result<void> update(); | |||
void fetchHeaders(); |
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.
Function does not seem to be trivial inside. Please leave a comment explaining what it is doing and how
@@ -153,6 +156,9 @@ namespace kagome::network { | |||
bool fetchJustificationRange(primitives::BlockNumber min, | |||
FetchJustificationRangeCb cb) override; | |||
|
|||
bool fetchHeadersBack(const primitives::BlockInfo& max, primitives::BlockNumber min, bool isFinalized, |
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.
document function
fa931df
to
2dfe877
Compare
Referenced issues
Closes #2193
Closes #1917
Description of the Change
Possible Drawbacks
Checklist Before Opening a PR
Before you open a Pull Request (PR), please make sure you've completed the following steps and confirm by answering 'Yes' to each item: