Skip to content

Commit c421589

Browse files
author
Cameron Fairchild
committed
chore: clippy
1 parent de41a34 commit c421589

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

pallets/subtensor/src/migrations/migrate_fix_pending_emission.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,17 @@ impl<T: Config> Pallet<T> {
212212
// Check the total hotkey stake is the same
213213
assert_eq!(
214214
TotalHotkeyStake::<T>::get(taostats_old_hk_acct),
215-
old.old_null_stake_taostats + old.old_migration_stake_taostats
215+
old.old_null_stake_taostats
216+
.saturating_add(old.old_migration_stake_taostats)
216217
);
217218

218219
let new_null_stake_taostats =
219220
Self::get_stake_for_coldkey_and_hotkey(migration_ck_acct, taostats_old_hk_acct);
220221

221222
assert_eq!(
222223
new_null_stake_taostats,
223-
old.old_null_stake_taostats + old.old_migration_stake_taostats
224+
old.old_null_stake_taostats
225+
.saturating_add(old.old_migration_stake_taostats)
224226
);
225227
}
226228
_ => {
@@ -263,15 +265,17 @@ impl<T: Config> Pallet<T> {
263265
// Check the total hotkey stake is the same
264266
assert_eq!(
265267
TotalHotkeyStake::<T>::get(datura_old_hk_acct),
266-
old.old_null_stake_datura + old.old_migration_stake_datura
268+
old.old_null_stake_datura
269+
.saturating_add(old.old_migration_stake_datura)
267270
);
268271

269272
let new_null_stake_datura =
270273
Self::get_stake_for_coldkey_and_hotkey(migration_ck_acct, datura_old_hk_acct);
271274

272275
assert_eq!(
273276
new_null_stake_datura,
274-
old.old_null_stake_datura + old.old_migration_stake_datura
277+
old.old_null_stake_datura
278+
.saturating_add(old.old_migration_stake_datura)
275279
);
276280
}
277281
_ => {

0 commit comments

Comments
 (0)