File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
pallets/subtensor/src/rpc_info Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 11use super :: * ;
22use frame_support:: pallet_prelude:: { Decode , Encode } ;
3- use frame_support:: storage:: IterableStorageDoubleMap ;
43extern crate alloc;
54use codec:: Compact ;
65
@@ -179,12 +178,10 @@ impl<T: Config> Pallet<T> {
179178 let last_update = Self :: get_last_update_for_uid ( netuid, uid) ;
180179 let validator_permit = Self :: get_validator_permit_for_uid ( netuid, uid) ;
181180
182- let stake: Vec < ( T :: AccountId , Compact < u64 > ) > =
183- <Stake < T > as IterableStorageDoubleMap < T :: AccountId , T :: AccountId , u64 > >:: iter_prefix (
184- hotkey. clone ( ) ,
185- )
186- . map ( |( coldkey, stake) | ( coldkey, stake. into ( ) ) )
187- . collect ( ) ;
181+ let stake: Vec < ( T :: AccountId , Compact < u64 > ) > = vec ! [ (
182+ coldkey. clone( ) ,
183+ Self :: get_stake_for_hotkey_on_subnet( & hotkey, netuid) . into( ) ,
184+ ) ] ;
188185
189186 let neuron = NeuronInfoLite {
190187 hotkey : hotkey. clone ( ) ,
You can’t perform that action at this time.
0 commit comments