Skip to content
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

Merged
merged 32 commits into from
Jan 26, 2024
Merged

Replaces PR #727 #733

merged 32 commits into from
Jan 26, 2024

Conversation

GitGab19
Copy link
Collaborator

Closes #712, #730

error_code: SubmitSharesError::invalid_job_id_error_code()
.to_string()
.try_into()
.unwrap(),
Copy link
Collaborator

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

Copy link
Collaborator

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 {
Copy link
Collaborator

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

@Fi3 Fi3 merged commit cd3ab95 into stratum-mining:dev Jan 26, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants