mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 06:08:00 +00:00
staking miner: remove needless queue check (#6221)
* staking miner: remove needless queue check If the queue is full and the "mined solution" is better than solutions in the queue according to the "strategy" then the solution with worse score will be kicked out from the queue. Thus, the check can be removed completly. * fix compile warns
This commit is contained in:
@@ -253,7 +253,6 @@ enum Error<T: EPM::Config> {
|
||||
AlreadySubmitted,
|
||||
VersionMismatch,
|
||||
StrategyNotSatisfied,
|
||||
QueueFull,
|
||||
Other(String),
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user