-
Notifications
You must be signed in to change notification settings - Fork 122
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
Replaces PR #727 #733
Replaces PR #727 #733
Conversation
error_code: SubmitSharesError::invalid_job_id_error_code() | ||
.to_string() | ||
.try_into() | ||
.unwrap(), |
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.
add a comment that exaplain why the unwrap is safe
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 agree.
Going forward, IMO we should try to keep some discipline around the usage of unwrap
, because we are getting some criticism from the community.
for example: #723 (comment)
@@ -244,21 +243,33 @@ impl Downstream { | |||
|| (hashrate_delta_percentage >= 30.0) && (delta_time >= 240) | |||
|| (hashrate_delta_percentage >= 15.0) && (delta_time >= 300) | |||
{ | |||
if realized_share_per_min < 0.01 { | |||
if realized_share_per_min == 0.0 { |
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.
this is a float are you sure that is safe to change from < to ==
If yes write a comment that explain why
Closes #712, #730