Skip to content

Commit

Permalink
Merge pull request #783 from opentensor/devnet
Browse files Browse the repository at this point in the history
Testnet
  • Loading branch information
distributedstatemachine authored Sep 5, 2024
2 parents bcf28bd + dbb5b5d commit 94256d5
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pallets/subtensor/src/rpc_info/neuron_info.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use super::*;
use frame_support::pallet_prelude::{Decode, Encode};
use frame_support::storage::IterableStorageDoubleMap;
extern crate alloc;
use codec::Compact;

Expand Down Expand Up @@ -179,12 +178,10 @@ impl<T: Config> Pallet<T> {
let last_update = Self::get_last_update_for_uid(netuid, uid);
let validator_permit = Self::get_validator_permit_for_uid(netuid, uid);

let stake: Vec<(T::AccountId, Compact<u64>)> =
<Stake<T> as IterableStorageDoubleMap<T::AccountId, T::AccountId, u64>>::iter_prefix(
hotkey.clone(),
)
.map(|(coldkey, stake)| (coldkey, stake.into()))
.collect();
let stake: Vec<(T::AccountId, Compact<u64>)> = vec![(
coldkey.clone(),
Self::get_stake_for_hotkey_on_subnet(&hotkey, netuid).into(),
)];

let neuron = NeuronInfoLite {
hotkey: hotkey.clone(),
Expand Down

0 comments on commit 94256d5

Please sign in to comment.