File tree Expand file tree Collapse file tree 5 files changed +10
-1
lines changed Expand file tree Collapse file tree 5 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,7 @@ parameter_types! {
134
134
pub const InitialColdkeySwapScheduleDuration : u64 = 5 * 24 * 60 * 60 / 12 ; // 5 days
135
135
pub const InitialDissolveNetworkScheduleDuration : u64 = 5 * 24 * 60 * 60 / 12 ; // 5 days
136
136
pub const InitialTaoWeight : u64 = u64 :: MAX /10 ; // 10% global weight.
137
+ pub const InitialEmaPriceHalvingPeriod : u64 = 201_600_u64 ; // 4 weeks
137
138
}
138
139
139
140
impl pallet_subtensor:: Config for Test {
@@ -197,6 +198,7 @@ impl pallet_subtensor::Config for Test {
197
198
type InitialColdkeySwapScheduleDuration = InitialColdkeySwapScheduleDuration ;
198
199
type InitialDissolveNetworkScheduleDuration = InitialDissolveNetworkScheduleDuration ;
199
200
type InitialTaoWeight = InitialTaoWeight ;
201
+ type InitialEmaPriceHalvingPeriod = InitialEmaPriceHalvingPeriod ;
200
202
}
201
203
202
204
#[ derive_impl( frame_system:: config_preludes:: TestDefaultConfig ) ]
Original file line number Diff line number Diff line change @@ -398,7 +398,7 @@ pub mod pallet {
398
398
#[ pallet:: type_value]
399
399
/// Default EMA price halving blocks
400
400
pub fn DefaultEMAPriceMovingBlocks < T : Config > ( ) -> u64 {
401
- 201_600
401
+ T :: InitialEmaPriceHalvingPeriod :: get ( )
402
402
}
403
403
#[ pallet:: type_value]
404
404
/// Default registrations this block.
Original file line number Diff line number Diff line change @@ -207,5 +207,8 @@ mod config {
207
207
/// Initial TAO weight.
208
208
#[ pallet:: constant]
209
209
type InitialTaoWeight : Get < u64 > ;
210
+ /// Initial EMA price halving period
211
+ #[ pallet:: constant]
212
+ type InitialEmaPriceHalvingPeriod : Get < u64 > ;
210
213
}
211
214
}
Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ parameter_types! {
184
184
pub const InitialColdkeySwapScheduleDuration : u64 = 5 * 24 * 60 * 60 / 12 ; // Default as 5 days
185
185
pub const InitialDissolveNetworkScheduleDuration : u64 = 5 * 24 * 60 * 60 / 12 ; // Default as 5 days
186
186
pub const InitialTaoWeight : u64 = 0 ; // 100% global weight.
187
+ pub const InitialEmaPriceHalvingPeriod : u64 = 201_600_u64 ; // 4 weeks
187
188
}
188
189
189
190
// Configure collective pallet for council
@@ -406,6 +407,7 @@ impl crate::Config for Test {
406
407
type InitialColdkeySwapScheduleDuration = InitialColdkeySwapScheduleDuration ;
407
408
type InitialDissolveNetworkScheduleDuration = InitialDissolveNetworkScheduleDuration ;
408
409
type InitialTaoWeight = InitialTaoWeight ;
410
+ type InitialEmaPriceHalvingPeriod = InitialEmaPriceHalvingPeriod ;
409
411
}
410
412
411
413
pub struct OriginPrivilegeCmp ;
Original file line number Diff line number Diff line change @@ -1017,6 +1017,7 @@ parameter_types! {
1017
1017
pub const InitialColdkeySwapScheduleDuration : BlockNumber = 5 * 24 * 60 * 60 / 12 ; // 5 days
1018
1018
pub const InitialDissolveNetworkScheduleDuration : BlockNumber = 5 * 24 * 60 * 60 / 12 ; // 5 days
1019
1019
pub const SubtensorInitialTaoWeight : u64 = 971_718_665_099_567_868 ; // 0.05267697438728329% tao weight.
1020
+ pub const InitialEmaPriceHalvingPeriod : u64 = 201_600_u64 ; // 4 weeks
1020
1021
}
1021
1022
1022
1023
impl pallet_subtensor:: Config for Runtime {
@@ -1080,6 +1081,7 @@ impl pallet_subtensor::Config for Runtime {
1080
1081
type Preimages = Preimage ;
1081
1082
type InitialColdkeySwapScheduleDuration = InitialColdkeySwapScheduleDuration ;
1082
1083
type InitialDissolveNetworkScheduleDuration = InitialDissolveNetworkScheduleDuration ;
1084
+ type InitialEmaPriceHalvingPeriod = InitialEmaPriceHalvingPeriod ;
1083
1085
}
1084
1086
1085
1087
use sp_runtime:: BoundedVec ;
You can’t perform that action at this time.
0 commit comments