-
Notifications
You must be signed in to change notification settings - Fork 324
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
[staking] remove unnecessary call from GetStakingStateReader #3695
Conversation
height: height, | ||
view: view, | ||
}, nil | ||
} |
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.
protocol.Start()
calls CreateBaseView()
and after that the view will be written, so there's no need to check and call CreateBaseView()
again here. In other words, if error happens sth is wrong
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.
in this case, do we still need to keep this function?
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.
fixed
Codecov Report
@@ Coverage Diff @@
## master #3695 +/- ##
==========================================
- Coverage 74.47% 73.70% -0.78%
==========================================
Files 269 276 +7
Lines 23925 24135 +210
==========================================
- Hits 17818 17788 -30
- Misses 5174 5440 +266
+ Partials 933 907 -26
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -123,18 +123,6 @@ func (c *candSR) ActiveBucketsCount() uint64 { | |||
func GetStakingStateReader(sr protocol.StateReader) (CandidateStateReader, error) { |
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.
Replace GetStakingStateReader
with ConstructBaseView
?
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.
fixed
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Description
as title
Fixes #(issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: