Skip to content

Commit e2c46c0

Browse files
committed
typos
1 parent c797cd1 commit e2c46c0

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

pallets/subtensor/src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ pub mod pallet {
116116
pub const MIN_BALANCE_TO_PERFORM_COLDKEY_SWAP: TaoCurrency = TaoCurrency::new(100_000_000); // 0.1 TAO in RAO
117117

118118
/// Minimum commit reveal periods
119-
pub const MIN_COMMIT_REVEAL_PEROIDS: u64 = 1;
119+
pub const MIN_COMMIT_REVEAL_PERIODS: u64 = 1;
120120
/// Maximum commit reveal periods
121-
pub const MAX_COMMIT_REVEAL_PEROIDS: u64 = 100;
121+
pub const MAX_COMMIT_REVEAL_PERIODS: u64 = 100;
122122

123123
#[pallet::pallet]
124124
#[pallet::without_storage_info]
@@ -682,7 +682,7 @@ pub mod pallet {
682682

683683
/// Default value for last mechanism step block.
684684
#[pallet::type_value]
685-
pub fn DefaultLastMechanismStepBlock<T: Config>() -> u64 {
685+
pub fn DefaultLastMechansimStepBlock<T: Config>() -> u64 {
686686
0
687687
}
688688

@@ -896,7 +896,7 @@ pub mod pallet {
896896
T::InitialTxDelegateTakeRateLimit::get()
897897
}
898898

899-
/// Default value for chidlkey take rate limiting
899+
/// Default value for childkey take rate limiting
900900
#[pallet::type_value]
901901
pub fn DefaultTxChildKeyTakeRateLimit<T: Config>() -> u64 {
902902
T::InitialTxChildKeyTakeRateLimit::get()
@@ -1533,7 +1533,7 @@ pub mod pallet {
15331533
/// ============================
15341534
/// ==== Rate Limiting =====
15351535
/// ============================
1536-
/// --- MAP ( RateLimitKey ) --> Block number in which the last rate limited operation occured
1536+
/// --- MAP ( RateLimitKey ) --> Block number in which the last rate limited operation occurred
15371537
#[pallet::storage]
15381538
pub type LastRateLimitedBlock<T: Config> =
15391539
StorageMap<_, Identity, RateLimitKey<T::AccountId>, u64, ValueQuery, DefaultZeroU64<T>>;
@@ -1641,7 +1641,7 @@ pub mod pallet {
16411641
/// --- MAP ( netuid ) --> last_mechanism_step_block
16421642
#[pallet::storage]
16431643
pub type LastMechansimStepBlock<T> =
1644-
StorageMap<_, Identity, NetUid, u64, ValueQuery, DefaultLastMechanismStepBlock<T>>;
1644+
StorageMap<_, Identity, NetUid, u64, ValueQuery, DefaultLastMechansimStepBlock<T>>;
16451645

16461646
/// --- MAP ( netuid ) --> subnet_owner
16471647
#[pallet::storage]
@@ -2624,7 +2624,7 @@ impl<T: Config + pallet_balances::Config<Balance = u64>>
26242624
}
26252625

26262626
/// Enum that defines types of rate limited operations for
2627-
/// storing last block when this operation occured
2627+
/// storing last block when this operation occurred
26282628
#[derive(Encode, Decode, Clone, PartialEq, Eq, Debug, TypeInfo)]
26292629
pub enum RateLimitKey<AccountId> {
26302630
// The setting sn owner hotkey operation is rate limited per netuid

pallets/subtensor/src/migrations/migrate_commit_reveal_settings.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use alloc::string::String;
22

3-
use crate::MIN_COMMIT_REVEAL_PEROIDS;
3+
use crate::MIN_COMMIT_REVEAL_PERIODS;
44
use frame_support::IterableStorageMap;
55
use frame_support::{traits::Get, weights::Weight};
66
use subtensor_runtime_common::NetUid;
@@ -45,7 +45,7 @@ pub fn migrate_commit_reveal_settings<T: Config>() -> Weight {
4545
}
4646

4747
if RevealPeriodEpochs::<T>::get(*netuid) == 0 {
48-
RevealPeriodEpochs::<T>::insert(*netuid, MIN_COMMIT_REVEAL_PEROIDS);
48+
RevealPeriodEpochs::<T>::insert(*netuid, MIN_COMMIT_REVEAL_PERIODS);
4949
weight = weight.saturating_add(T::DbWeight::get().writes(1));
5050
}
5151
}

pallets/subtensor/src/rpc_info/metagraph.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub struct Metagraph<AccountId: TypeInfo + Encode + Decode> {
9090
coldkeys: Vec<AccountId>, // coldkey per UID
9191
identities: Vec<Option<ChainIdentityOfV2>>, // coldkeys identities
9292
axons: Vec<AxonInfo>, // UID axons
93-
active: Vec<bool>, // Avtive per UID
93+
active: Vec<bool>, // Active per UID
9494
validator_permit: Vec<bool>, // Val permit per UID
9595
pruning_score: Vec<Compact<u16>>, // Pruning per UID
9696
last_update: Vec<Compact<u64>>, // Last update per UID
@@ -141,7 +141,7 @@ pub struct SelectiveMetagraph<AccountId: TypeInfo + Encode + Decode + Clone> {
141141
alpha_in_emission: Option<Compact<AlphaCurrency>>, // amount injected outstanding per block
142142
tao_in_emission: Option<Compact<TaoCurrency>>, // amount of tao injected per block
143143
pending_alpha_emission: Option<Compact<AlphaCurrency>>, // pending alpha to be distributed
144-
pending_root_emission: Option<Compact<TaoCurrency>>, // panding tao for root divs to be distributed
144+
pending_root_emission: Option<Compact<TaoCurrency>>, // pending tao for root divs to be distributed
145145
subnet_volume: Option<Compact<u128>>, // volume of the subnet in TAO
146146
moving_price: Option<I96F32>, // subnet moving price.
147147

@@ -190,7 +190,7 @@ pub struct SelectiveMetagraph<AccountId: TypeInfo + Encode + Decode + Clone> {
190190
coldkeys: Option<Vec<AccountId>>, // coldkey per UID
191191
identities: Option<Vec<Option<ChainIdentityOfV2>>>, // coldkeys identities
192192
axons: Option<Vec<AxonInfo>>, // UID axons.
193-
active: Option<Vec<bool>>, // Avtive per UID
193+
active: Option<Vec<bool>>, // Active per UID
194194
validator_permit: Option<Vec<bool>>, // Val permit per UID
195195
pruning_score: Option<Vec<Compact<u16>>>, // Pruning per UID
196196
last_update: Option<Vec<Compact<u64>>>, // Last update per UID
@@ -697,7 +697,7 @@ impl<T: Config> Pallet<T> {
697697
pending_alpha_emission: PendingValidatorEmission::<T>::get(netuid)
698698
.saturating_add(PendingServerEmission::<T>::get(netuid))
699699
.into(), // pending alpha to be distributed
700-
pending_root_emission: TaoCurrency::from(0u64).into(), // panding tao for root divs to be distributed
700+
pending_root_emission: TaoCurrency::from(0u64).into(), // pending tao for root divs to be distributed
701701
subnet_volume: subnet_volume.into(),
702702
moving_price: SubnetMovingPrice::<T>::get(netuid),
703703

@@ -1650,13 +1650,13 @@ fn test_selective_metagraph() {
16501650
metagraph.merge_value(&metagraph_name, name_index);
16511651
assert!(metagraph.name.is_some());
16521652

1653-
let alph_low_index: usize = 50;
1653+
let alpha_low_index: usize = 50;
16541654
let metagraph_alpha_low = SelectiveMetagraph::<u32> {
16551655
netuid: NetUid::ROOT.into(),
16561656
alpha_low: Some(0_u16.into()),
16571657
..Default::default()
16581658
};
16591659
assert!(metagraph.alpha_low.is_none());
1660-
metagraph.merge_value(&metagraph_alpha_low, alph_low_index);
1660+
metagraph.merge_value(&metagraph_alpha_low, alpha_low_index);
16611661
assert!(metagraph.alpha_low.is_some());
16621662
}

pallets/subtensor/src/subnets/weights.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::*;
22
use crate::epoch::math::*;
3-
use crate::{Error, MAX_COMMIT_REVEAL_PEROIDS, MIN_COMMIT_REVEAL_PEROIDS};
3+
use crate::{Error, MAX_COMMIT_REVEAL_PERIODS, MIN_COMMIT_REVEAL_PERIODS};
44
use codec::Compact;
55
use frame_support::dispatch::DispatchResult;
66
use safe_math::*;
@@ -1288,12 +1288,12 @@ impl<T: Config> Pallet<T> {
12881288

12891289
pub fn set_reveal_period(netuid: NetUid, reveal_period: u64) -> DispatchResult {
12901290
ensure!(
1291-
reveal_period <= MAX_COMMIT_REVEAL_PEROIDS,
1291+
reveal_period <= MAX_COMMIT_REVEAL_PERIODS,
12921292
Error::<T>::RevealPeriodTooLarge
12931293
);
12941294

12951295
ensure!(
1296-
reveal_period >= MIN_COMMIT_REVEAL_PEROIDS,
1296+
reveal_period >= MIN_COMMIT_REVEAL_PERIODS,
12971297
Error::<T>::RevealPeriodTooSmall
12981298
);
12991299

pallets/subtensor/src/tests/epoch.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,7 +1696,7 @@ fn test_outdated_weights() {
16961696
U256::from(new_key),
16971697
U256::from(new_key)
16981698
));
1699-
let deregistered_uid: u16 = n - 1; // since uid=n-1 only recieved 1/3 of weight, it will get pruned first
1699+
let deregistered_uid: u16 = n - 1; // since uid=n-1 only received 1/3 of weight, it will get pruned first
17001700
assert_eq!(
17011701
U256::from(new_key),
17021702
SubtensorModule::get_hotkey_for_net_and_uid(netuid, deregistered_uid)
@@ -2078,7 +2078,7 @@ fn test_deregistered_miner_bonds() {
20782078
U256::from(new_key),
20792079
U256::from(new_key)
20802080
));
2081-
let deregistered_uid: u16 = n - 1; // since uid=n-1 only recieved 1/3 of weight, it will get pruned first
2081+
let deregistered_uid: u16 = n - 1; // since uid=n-1 only received 1/3 of weight, it will get pruned first
20822082
assert_eq!(
20832083
U256::from(new_key),
20842084
SubtensorModule::get_hotkey_for_net_and_uid(netuid, deregistered_uid)

0 commit comments

Comments
 (0)