Skip to content

Commit 55b91c8

Browse files
committed
also fix uidj index
1 parent c84fadd commit 55b91c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pallets/subtensor/src/epoch.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,9 @@ impl<T: Config> Pallet<T> {
737737
continue;
738738
}
739739
for (uid_j, weight_ij) in weights_i.iter() {
740+
if *uid_j >= n {
741+
continue;
742+
}
740743
weights[uid_i as usize].push((*uid_j, I32F32::from_num(*weight_ij)));
741744
}
742745
}

0 commit comments

Comments
 (0)