File tree 1 file changed +4
-7
lines changed
pallets/subtensor/src/rpc_info
1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
1
use super :: * ;
2
2
use frame_support:: pallet_prelude:: { Decode , Encode } ;
3
- use frame_support:: storage:: IterableStorageDoubleMap ;
4
3
extern crate alloc;
5
4
use codec:: Compact ;
6
5
@@ -179,12 +178,10 @@ impl<T: Config> Pallet<T> {
179
178
let last_update = Self :: get_last_update_for_uid ( netuid, uid) ;
180
179
let validator_permit = Self :: get_validator_permit_for_uid ( netuid, uid) ;
181
180
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
+ ) ] ;
188
185
189
186
let neuron = NeuronInfoLite {
190
187
hotkey : hotkey. clone ( ) ,
You can’t perform that action at this time.
0 commit comments