-
Notifications
You must be signed in to change notification settings - Fork 245
fix(manager): move update height #1782
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
Conversation
WalkthroughThe recent changes enhance the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
0a8ef11 to
58dc593
Compare
58dc593 to
0341c26
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- block/manager.go (2 hunks)
- block/manager_test.go (3 hunks)
Additional comments not posted (3)
block/manager_test.go (2)
44-48: LGTM!The
prepareProposalResponsefunction correctly constructs a response with the transactions from the request.
568-719: Comprehensive test coverage forpublishBlock.The
TestManager_publishBlockfunction effectively tests thepublishBlockmethod under various scenarios, including successful execution and error handling. The use of mocks for dependencies and assertions for expected outcomes is well-implemented.block/manager.go (1)
944-946: Improved atomicity in block processing.The repositioning of
m.store.SetHeight(ctx, blockHeight)ensures that the store height is updated only after block responses are saved, enhancing atomicity and reducing potential inconsistencies in the database.
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- block/manager_test.go (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- block/manager_test.go
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- block/manager_test.go (3 hunks)
Additional comments not posted (3)
block/manager_test.go (3)
6-11: Imports look good.The added imports are necessary for the new functionalities and tests.
Also applies to: 15-27, 36-37
44-48: Helper functionprepareProposalResponseis well-implemented.This function correctly returns a mock response for proposal preparation.
568-709: Comprehensive test forpublishBlockmethod.The test function effectively verifies the behavior of
publishBlockin both successful and error scenarios. It ensures the block height is updated correctly and handles errors as expected.
tzdybal
left a comment
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 left some nit-picking comments about error strings - IMHO they can as well be handled as followup good first issue.
|
There are quite a few err strings around the same place e.g.: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main rollkit/rollkit#1782 +/- ##
==========================================
+ Coverage 43.27% 43.84% +0.56%
==========================================
Files 76 76
Lines 10033 10033
==========================================
+ Hits 4342 4399 +57
+ Misses 4975 4900 -75
- Partials 716 734 +18 ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- block/manager_test.go (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- block/manager_test.go
MSevey
left a comment
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 should be updated to prevent confusion.
6c40f73 to
b60bb62
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- block/manager.go (2 hunks)
- block/manager_test.go (3 hunks)
Files skipped from review as they are similar to previous changes (2)
- block/manager.go
- block/manager_test.go
Overview
Update height only after block responses are saved.
Partially fixes evstack/ev-abci#21
Summary by CodeRabbit
New Features
Bug Fixes
Tests