From 4c2629e35e74707fd96ca572847d87086c420adb Mon Sep 17 00:00:00 2001 From: Cameron Fairchild Date: Tue, 17 Sep 2024 12:08:20 -0400 Subject: [PATCH] Add back old migration and fix var names --- pallets/subtensor/src/utils/try_state.rs | 2 +- runtime/src/lib.rs | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pallets/subtensor/src/utils/try_state.rs b/pallets/subtensor/src/utils/try_state.rs index 4763c0484..10abf970f 100644 --- a/pallets/subtensor/src/utils/try_state.rs +++ b/pallets/subtensor/src/utils/try_state.rs @@ -17,7 +17,7 @@ impl Pallet { // Calculate the total staked amount let mut total_staked: u64 = 0; - for (_account, _netuid, stake) in Stake::::iter() { + for (_hotkey, _coldkey, stake) in Stake::::iter() { total_staked = total_staked.saturating_add(stake); } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 031328d5c..270b0a069 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -1075,8 +1075,12 @@ pub type SignedExtra = ( frame_metadata_hash_extension::CheckMetadataHash, ); -type Migrations = - (pallet_subtensor::migrations::migrate_fix_pending_emission::migration::Migration,); +type Migrations = ( + pallet_subtensor::migrations::migrate_init_total_issuance::initialise_total_issuance::Migration< + Runtime, + >, + pallet_subtensor::migrations::migrate_fix_pending_emission::migration::Migration, +); // Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic =