Skip to content

Commit

Permalink
init not compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
4meta5 committed Jun 14, 2024
1 parent 692ce9f commit 682bcf6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pallets/tasks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -935,9 +935,15 @@ pub mod pallet {
if let Some(shard_id) = shard_id {
Self::schedule_tasks_shard(network, shard_id);
} else {
for (shard, _) in NetworkShards::<T>::iter_prefix(network) {
// assign tasks by least assigned
let mut shards = NetworkShards::<T>::iter_prefix(network).collect::<Vec<_>>();
shards.sort_by(|a, b| {
(ShardTasks::<T>::iter_prefix(a).count())

Check failure on line 941 in pallets/tasks/src/lib.rs

View workflow job for this annotation

GitHub Actions / generate

the trait bound `&(u64, ()): EncodeLike<u64>` is not satisfied
.cmp(&ShardTasks::<T>::iter_prefix(b).count())

Check failure on line 942 in pallets/tasks/src/lib.rs

View workflow job for this annotation

GitHub Actions / generate

the trait bound `&(u64, ()): EncodeLike<u64>` is not satisfied
});
shards.into_iter().rev().for_each(|(shard, _)| {
Self::schedule_tasks_shard(network, shard);
}
});
}
}

Expand Down

0 comments on commit 682bcf6

Please sign in to comment.