-
Notifications
You must be signed in to change notification settings - Fork 171
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
Fix segfault in setting a pricePerBroadcaster for 3 or more B's #2820
Conversation
@stronk-dev could you fix |
common/readfromfile.go
Outdated
@@ -11,6 +11,9 @@ import ( | |||
// A valid string will always be returned, regardless of whether an error occurred. | |||
func ReadFromFile(s string) (string, error) { | |||
info, err := os.Stat(s) | |||
if err != nil { | |||
return s, err | |||
} | |||
if os.IsNotExist(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.
Doesn't this check now become redundant?
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.
true, removed it
Seems like one of the unit tests is failing now, as the |
Yeah, I think that makes sense |
@stronk-dev I don't think it's caused by this PR but if you can figure out what's going on with the tests then that'd be great |
It seems to fail in the
For the rest I'm not too familiar with the code or how these tests are ran to be able to fix it. From where the modified |
Codecov Report
@@ Coverage Diff @@
## master #2820 +/- ##
===================================================
- Coverage 56.70668% 56.51654% -0.19014%
===================================================
Files 88 88
Lines 19160 19228 +68
===================================================
+ Hits 10865 10867 +2
- Misses 7699 7762 +63
- Partials 596 599 +3
Continue to review full report in Codecov by Sentry.
|
@thomshutt I think the CI passes now and I approved the PR, do you want to re-review or should I merge? |
@leszko let's merge! |
…peer#2820) * Fix segfault in setting a pricePerBroadcaster for 3 or more B's * go fmt * Remove error * Modify the `TestReadFromFileNoFileExists` unit test to expect an error * Fix typo --------- Co-authored-by: Thom Shutt <[email protected]>
Fixes #2819
Maybe we want to add some more checks or logging of what the error is
cc @eliteprox