Skip to content

Commit 07c22cb

Browse files
authored
Merge pull request #2310 from latent-to/fix/clear-taoflow-ema-new-subnet
Fix: clear taoflow and EMA for new subnet
2 parents 7de8a10 + 9328113 commit 07c22cb

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

pallets/subtensor/src/coinbase/root.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ impl<T: Config> Pallet<T> {
298298
SubnetTaoInEmission::<T>::remove(netuid);
299299
SubnetVolume::<T>::remove(netuid);
300300
SubnetMovingPrice::<T>::remove(netuid);
301+
SubnetTaoFlow::<T>::remove(netuid);
302+
SubnetEmaTaoFlow::<T>::remove(netuid);
301303
SubnetTaoProvided::<T>::remove(netuid);
302304

303305
// --- 13. Token / mechanism / registration toggles.

pallets/subtensor/src/tests/networks.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,10 @@ fn dissolve_clears_all_per_subnet_storages() {
368368
SubnetTaoProvided::<Test>::insert(net, TaoCurrency::from(1));
369369
SubnetAlphaInProvided::<Test>::insert(net, AlphaCurrency::from(1));
370370

371+
// TAO Flow
372+
SubnetTaoFlow::<Test>::insert(net, 0i64);
373+
SubnetEmaTaoFlow::<Test>::insert(net, (0u64, substrate_fixed::types::I64F64::from_num(0)));
374+
371375
// Subnet locks
372376
TransferToggle::<Test>::insert(net, true);
373377
SubnetLocked::<Test>::insert(net, TaoCurrency::from(1));
@@ -500,6 +504,10 @@ fn dissolve_clears_all_per_subnet_storages() {
500504
assert!(!SubnetTaoInEmission::<Test>::contains_key(net));
501505
assert!(!SubnetVolume::<Test>::contains_key(net));
502506

507+
// TAO Flow
508+
assert!(!SubnetTaoFlow::<Test>::contains_key(net));
509+
assert!(!SubnetEmaTaoFlow::<Test>::contains_key(net));
510+
503511
// These are now REMOVED
504512
assert!(!SubnetAlphaIn::<Test>::contains_key(net));
505513
assert!(!SubnetAlphaOut::<Test>::contains_key(net));

runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
241241
// `spec_version`, and `authoring_version` are the same between Wasm and native.
242242
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
243243
// the compatible custom types.
244-
spec_version: 364,
244+
spec_version: 365,
245245
impl_version: 1,
246246
apis: RUNTIME_API_VERSIONS,
247247
transaction_version: 1,

0 commit comments

Comments
 (0)