Skip to content

Commit

Permalink
last changes
Browse files Browse the repository at this point in the history
  • Loading branch information
GitGab19 committed Jan 26, 2024
1 parent b1f815b commit 22f43fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,8 @@ impl ProxyExtendedChannelFactory {
let error = SubmitSharesError {
channel_id: m.channel_id,
sequence_number: m.sequence_number,
// Infallible unwrap we already know the len of the error code (is a
// static string)
error_code: SubmitSharesError::invalid_job_id_error_code()
.to_string()
.try_into()
Expand Down
2 changes: 2 additions & 0 deletions roles/translator/src/lib/downstream_sv1/diff_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ impl Downstream {
|| (hashrate_delta_percentage >= 30.0) && (delta_time >= 240)
|| (hashrate_delta_percentage >= 15.0) && (delta_time >= 300)
{
// realized_share_per_min is 0.0 when d.difficulty_mgmt.submits_since_last_update is 0
// so it's safe to compare realized_share_per_min with == 0.0
if realized_share_per_min == 0.0 {
new_miner_hashrate = match delta_time {
dt if dt <= 30 => d.difficulty_mgmt.min_individual_miner_hashrate / 1.5,
Expand Down

0 comments on commit 22f43fe

Please sign in to comment.