We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db23d18 commit b908f0dCopy full SHA for b908f0d
pallets/subtensor/src/invariants.rs
@@ -1,5 +1,5 @@
1
use super::*;
2
-extern crate alloc;
+
3
use frame_support::pallet_prelude::*;
4
use sp_std::vec::Vec;
5
use sp_runtime::traits::Zero;
@@ -41,7 +41,7 @@ impl<T: Config> Pallet<T> {
41
// We sum the TotalHotkeyAlpha for each hotkey.
42
// Requirement matches: "sum(neuron_stake in subnet) == stored subnet_total_stake"
43
for (_, hotkey) in Keys::<T>::iter_prefix(netuid) {
44
- let alpha = TotalHotkeyAlpha::<T>::get(&hotkey, netuid);
+ let alpha = Self::get_stake_for_hotkey_on_subnet(&hotkey, netuid);
45
calculated_total_alpha = calculated_total_alpha.saturating_add(alpha);
46
}
47
0 commit comments