-
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
Document parachain processor #2029
Conversation
// Call the `handshakeAndReadMessages` function with the `on_handshake` | ||
// and `on_message` functions as arguments. |
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.
мне кажется это понятно из кода
* @brief Handles the handshake with the peer. | ||
* | ||
* @param peer The peer to handshake with. | ||
*/ |
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.
возможно, что на приватные методы можно не добавлять описание
/// The relay-parent of the candidate. | ||
RelayHash relay_parent; | ||
/// The hash of the candidate. | ||
CandidateHash candidate_hash; |
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.
в полькадоте так добавляют комменты, но по сути это просто дублирование объявления
@@ -2244,13 +2292,18 @@ namespace kagome::parachain { | |||
return {}; | |||
} | |||
|
|||
// If the relay parent state has a prospective parachains mode |
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.
дублирование того что написано в коде
|
||
// Iterate over the availability cores of the relay parent state | ||
for (size_t core_idx = 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.
но читать вроде немного проще чем сам код, если не мешает, то оставил бы
@@ -2292,6 +2345,7 @@ namespace kagome::parachain { | |||
continue; | |||
} | |||
|
|||
// If the attested candidate is found, add it to the backed vector |
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.
немного помогает при чтении кода
@@ -3363,6 +3418,7 @@ namespace kagome::parachain { | |||
auto need_to_process = | |||
our_current_state_.active_leaves.count(relay_parent) != 0ull; | |||
|
|||
// If not needed, skip the validation and return |
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.
тоже немного помогает, если не принципиально то оставил бы
|
||
// Validate the candidate, if validation fails, log the error and return |
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.
дублирование того что написано в коде
…arachains # Conflicts: # core/parachain/validator/impl/parachain_processor.cpp # core/parachain/validator/parachain_processor.hpp
26210c9
to
caed692
Compare
…arachains # Conflicts: # core/network/peer_manager.hpp # core/parachain/validator/impl/parachain_processor.cpp # core/parachain/validator/parachain_processor.hpp
Co-authored-by: Ruslan Tushov <turuslan@users.noreply.github.com>
Co-authored-by: Ruslan Tushov <turuslan@users.noreply.github.com>
Co-authored-by: Ruslan Tushov <turuslan@users.noreply.github.com>
Referenced issues
Related to https://github.com/qdrvm/KAGOME-audit/issues/30
Description of the Change
Adds documentation for the parachain processor class
Possible Drawbacks
Mostly auto-generated and updated
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: