Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pallets/subtensor/src/subnets/subnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ impl<T: Config> Pallet<T> {
log::info!("NetworkAdded( netuid:{netuid_to_register:?}, mechanism:{mechid:?} )");
Self::deposit_event(Event::NetworkAdded(netuid_to_register, mechid));

// --- 20. Default emission off
SubnetEmissionEnabled::<T>::insert(netuid_to_register, false);

// --- 20. Return success.
Ok(())
}
Expand Down
4 changes: 4 additions & 0 deletions pallets/subtensor/src/tests/coinbase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ fn test_coinbase_tao_issuance_base() {
let subnet_owner_ck = U256::from(1001);
let subnet_owner_hk = U256::from(1002);
let netuid = add_dynamic_network(&subnet_owner_hk, &subnet_owner_ck);
// Dynamic subnets register with emission disabled by default.
SubnetEmissionEnabled::<Test>::insert(netuid, true);
// Price-based emission shares require a non-zero moving price.
SubnetMovingPrice::<Test>::insert(netuid, I96F32::from_num(1));
// Keep root_proportion ~1 so the injection cap does not bind.
Expand Down Expand Up @@ -2955,6 +2957,8 @@ fn test_coinbase_v3_liquidity_update() {
// Enable emissions and run coinbase (which will increase position liquidity)
let emission: u64 = 1_234_567;
let emission_credit = SubtensorModule::mint_tao(emission.into());
// Dynamic subnets register with emission disabled by default.
SubnetEmissionEnabled::<Test>::insert(netuid, true);
// Price-based emission shares require a non-zero moving price.
SubnetMovingPrice::<Test>::insert(netuid, I96F32::from_num(1));
// Keep root_proportion ~1 so the injection cap does not bind.
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// `spec_version`, and `authoring_version` are the same between Wasm and native.
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
// the compatible custom types.
spec_version: 421,
spec_version: 422,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down
Loading