-
Notifications
You must be signed in to change notification settings - Fork 246
chore: improve code comments clarity #2947
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -185,7 +185,7 @@ func (sh *SignedHeader) ValidateBasic() error { | |
| return ErrSignatureVerificationFailed | ||
| } | ||
|
|
||
| // ValidateBasicWithData performs basic validator of a signed header, granted data for syncing node. | ||
| // ValidateBasicWithData performs basic validation of a signed header, given data for syncing node. | ||
| func (sh *SignedHeader) ValidateBasicWithData(data *Data) error { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This function To improve maintainability, consider refactoring the common validation logic into a private helper function. The differences, like the signature provider ( |
||
| if err := sh.Header.ValidateBasic(); err != nil { | ||
| return err | ||
|
|
||
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.
While this change improves the grammar, the comment could be more concise and align better with the comment for
ValidateBasic.ValidateBasicis documented as being for an aggregator node. This function appears to be for a sync node. A more direct comment would be clearer.