-
Notifications
You must be signed in to change notification settings - Fork 108
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
INFO-4: Code optimization/simplification #1021
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1021 +/- ##
==========================================
+ Coverage 81.00% 81.06% +0.06%
==========================================
Files 52 52
Lines 2153 2150 -3
Branches 72 70 -2
==========================================
- Hits 1744 1743 -1
+ Misses 394 392 -2
Partials 15 15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
584a44d
to
1c7b049
Compare
items[i].payloadID, | ||
ScaleCodec.checkedEncodeCompactU32(uint32(items[i].data.length)), | ||
items[i].data | ||
payload, items[i].payloadID, ScaleCodec.checkedEncodeCompactU32(items[i].data.length), items[i].data |
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.
It was easier to read this when each item was on its own line
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.
forge fmt
reverts to this form.
} | ||
|
||
function encodeDigestItem(DigestItem calldata digestItem) internal pure returns (bytes memory) { | ||
if (digestItem.kind == DIGEST_ITEM_PRERUNTIME) { | ||
if ( | ||
digestItem.kind == DIGEST_ITEM_PRERUNTIME || digestItem.kind == DIGEST_ITEM_CONSENSUS |
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.
lets have each test on its line if the formatter allows it.
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.
forge fmt
does not allow it.
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.
+1
Resolves: SNO-757