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 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 ( ) ,
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
142
142
// `spec_version`, and `authoring_version` are the same between Wasm and native.
143
143
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
144
144
// the compatible custom types.
145
- spec_version : 195 ,
145
+ spec_version : 196 ,
146
146
impl_version : 1 ,
147
147
apis : RUNTIME_API_VERSIONS ,
148
148
transaction_version : 1 ,
You can’t perform that action at this time.
0 commit comments