Skip to content

Commit

Permalink
Add back old migration and fix var names
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Fairchild committed Sep 17, 2024
1 parent c421589 commit 4c2629e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pallets/subtensor/src/utils/try_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl<T: Config> Pallet<T> {

// Calculate the total staked amount
let mut total_staked: u64 = 0;
for (_account, _netuid, stake) in Stake::<T>::iter() {
for (_hotkey, _coldkey, stake) in Stake::<T>::iter() {
total_staked = total_staked.saturating_add(stake);
}

Expand Down
8 changes: 6 additions & 2 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1075,8 +1075,12 @@ pub type SignedExtra = (
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
);

type Migrations =
(pallet_subtensor::migrations::migrate_fix_pending_emission::migration::Migration<Runtime>,);
type Migrations = (
pallet_subtensor::migrations::migrate_init_total_issuance::initialise_total_issuance::Migration<
Runtime,
>,
pallet_subtensor::migrations::migrate_fix_pending_emission::migration::Migration<Runtime>,
);

// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
Expand Down

0 comments on commit 4c2629e

Please sign in to comment.