File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
pallets/subtensor/src/rpc_info Expand file tree Collapse file tree 2 files changed +5
-8
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 ( ) ,
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
142142 // `spec_version`, and `authoring_version` are the same between Wasm and native.
143143 // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
144144 // the compatible custom types.
145- spec_version : 195 ,
145+ spec_version : 196 ,
146146 impl_version : 1 ,
147147 apis : RUNTIME_API_VERSIONS ,
148148 transaction_version : 1 ,
You can’t perform that action at this time.
0 commit comments