Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

staking miner: remove needless queue check #6221

Merged
merged 3 commits into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion utils/staking-miner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ enum Error<T: EPM::Config> {
AlreadySubmitted,
VersionMismatch,
StrategyNotSatisfied,
QueueFull,
Other(String),
}

Expand Down
5 changes: 2 additions & 3 deletions utils/staking-miner/src/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ async fn ensure_strategy_met<T: EPM::Config, B: BlockT>(
.map_err::<Error<T>, _>(Into::into)?
.unwrap_or_default();

// we check the queue here as well. Could be checked elsewhere.
if indices.len() as u32 >= max_submissions {
return Err(Error::<T>::QueueFull)
if indices.len() >= max_submissions as usize {
log::debug!(target: LOG_TARGET, "The submissions queue is full");
}

// default score is all zeros, any score is better than it.
Expand Down