Skip to content

Commit

Permalink
Downgrade outside of solution range error to debug if solution range …
Browse files Browse the repository at this point in the history
…was just adjusted (#2159)
  • Loading branch information
nazar-pc authored Oct 24, 2023
1 parent 4d63e88 commit f72a636
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions crates/sc-consensus-subspace/src/slot_worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,26 @@ where
.await;
}
}
Err(error @ subspace_verification::Error::OutsideSolutionRange { .. }) => {
// Solution range might have just adjusted, but when farmer was auditing they
// didn't know about this, so downgrade warning to debug message
if runtime_api
.solution_ranges(parent_hash)
.ok()
.and_then(|solution_ranges| solution_ranges.next)
.is_some()
{
debug!(
target: "subspace",
"Invalid solution received for slot {slot}: {error:?}",
);
} else {
warn!(
target: "subspace",
"Invalid solution received for slot {slot}: {error:?}",
);
}
}
Err(error) => {
warn!(target: "subspace", "Invalid solution received for slot {slot}: {error:?}");
}
Expand Down

0 comments on commit f72a636

Please sign in to comment.