Skip to content

Commit

Permalink
feat: ignoring no weights on decrypted consensus
Browse files Browse the repository at this point in the history
  • Loading branch information
functor-flow committed Nov 19, 2024
1 parent 6100738 commit cd1ea32
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pallets/subnet_emission/src/distribute_emission.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ fn run_default_consensus<T: Config>(

let weights: Vec<(u16, Vec<(u16, u16)>)> = Weights::<T>::iter_prefix(netuid).collect();

if weights.is_empty() {
return Err(NO_WEIGHTS);
}
// if weights.is_empty() {
// return Err(NO_WEIGHTS);
// }

YumaEpoch::new(netuid, params)
.run(weights)
Expand Down
2 changes: 2 additions & 0 deletions tests/src/subnet_emission.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,8 @@ fn test_tempo_compound() {
let fast = SubspaceMod::<Test>::get_delegated_stake(&f_key);
let slow = SubspaceMod::<Test>::get_delegated_stake(&s_key);

dbg!(fast, slow);

// faster tempo should have quicker compound rate
assert!(fast > slow);
});
Expand Down

0 comments on commit cd1ea32

Please sign in to comment.