Skip to content

Commit b908f0d

Browse files
committed
fix(subtensor): resolve pallet-subtensor compile error
1 parent db23d18 commit b908f0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pallets/subtensor/src/invariants.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use super::*;
2-
extern crate alloc;
2+
33
use frame_support::pallet_prelude::*;
44
use sp_std::vec::Vec;
55
use sp_runtime::traits::Zero;
@@ -41,7 +41,7 @@ impl<T: Config> Pallet<T> {
4141
// We sum the TotalHotkeyAlpha for each hotkey.
4242
// Requirement matches: "sum(neuron_stake in subnet) == stored subnet_total_stake"
4343
for (_, hotkey) in Keys::<T>::iter_prefix(netuid) {
44-
let alpha = TotalHotkeyAlpha::<T>::get(&hotkey, netuid);
44+
let alpha = Self::get_stake_for_hotkey_on_subnet(&hotkey, netuid);
4545
calculated_total_alpha = calculated_total_alpha.saturating_add(alpha);
4646
}
4747

0 commit comments

Comments
 (0)