-
Notifications
You must be signed in to change notification settings - Fork 117
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
chore(cometBFTService): some more minor cleanups #2021
Conversation
WalkthroughThe pull request introduces several modifications across multiple files in the codebase. Key changes include the removal of the Changes
Possibly related PRs
Suggested reviewers
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2021 +/- ##
=======================================
Coverage 22.37% 22.38%
=======================================
Files 358 358
Lines 16051 16045 -6
Branches 12 12
=======================================
Hits 3591 3591
+ Misses 12311 12305 -6
Partials 149 149
|
if err := s.sm.LoadLatestVersion(); err != nil { | ||
panic(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.
we must do this, otherwise beconKit will panic. The if loadLatest
is confusing to me, as it suggests this initialization is not mandatory
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 think its safe to remove, I think loadLatest was for if u want to instantiate a the cosmos BaseApp without initializing the DB, I don't see why we need this tho.
I have collected here some minor cleanups around CometBFT service:
loadLatest bool
since I believe we must callLoadLatestVersion()
in order to initialize the stores. Failing of doing that causes a panicSetName
since it is not called and name is set in service constructorSetVersion
since it's simple the assignment of a service attribute that can be done inlineStoreKeyServiceProvider
to return a pointer rather than a pointer to a pointer. It's important to avoid copying the key, but passing around the pointer should be enough. All consumers of the key deference the double pointer.I collected the changes together in the interest of reducing the number of PRs. Happy to further split them if reviewers require it.
Summary by CodeRabbit
New Features
Bug Fixes
Refactor