-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Numeric conversion cleanup #7465
Conversation
This reverts commit 19b376e. # Conflicts: # beacon-chain/rpc/beacon/validators.go
This reverts commit f4acd6e.
This reverts commit 2a5c9ee.
This reverts commit 2863f9c.
This reverts commit 6e8385f.
This reverts commit c64a153.
This reverts commit fe773b5.
This reverts commit 7a0931c.
# Conflicts: # beacon-chain/powchain/log_processing.go
This reverts commit 8b34137.
Codecov Report
@@ Coverage Diff @@
## master #7465 +/- ##
=======================================
Coverage 60.74% 60.74%
=======================================
Files 427 427
Lines 30385 30385
=======================================
Hits 18458 18458
Misses 8940 8940
Partials 2987 2987 |
Deepsource is still complaining that there are new issues introduced. Can you please take a look? |
beacon-chain/powchain/service.go
Outdated
@@ -722,6 +722,6 @@ func (s *Service) logTillChainStart() { | |||
|
|||
log.WithFields(logrus.Fields{ | |||
"Extra validators needed": valNeeded, | |||
"Time till minimum genesis": fmt.Sprintf("%s", time.Duration(secondsLeft)*time.Second), | |||
"Time till minimum genesis": fmt.Sprint((time.Duration(secondsLeft) * time.Second).String()), |
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.
No need for fmt.Sprint?
I don't think these are really new issues. Maybe nobody has touched these packages since we introduced DeepSource into the pipeline? Anyway, the only issues left are:
For (1) we have #6891. As for (2), this was already discussed on Discord and this "anti-pattern" seems to be a fairly standard Go pattern. I spoke about this with Nishant and Victor some time ago. We should confirm this and maybe configure the tool to ignore it? |
# Conflicts: # validator/keymanager/v2/derived/deposit_test.go
# Conflicts: # beacon-chain/powchain/service.go # beacon-chain/rpc/validator/proposer_test.go
What type of PR is this?
Cleanup
What does this PR do? Why is it needed?
Simplify/organize numeric conversions.
uint64()
int64()
uint()
int()
Which issues(s) does this PR fix?
N/A
Other notes for review
N/A