Skip to content

Commit d416b62

Browse files
authored
Merge pull request #1271 from opentensor/devnet-ready
devnet deploy again
2 parents 58a8a8a + 3226ce8 commit d416b62

File tree

3 files changed

+47
-363
lines changed

3 files changed

+47
-363
lines changed

pallets/subtensor/src/migrations/migrate_rao.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use alloc::string::String;
33
use frame_support::IterableStorageMap;
44
use frame_support::{traits::Get, weights::Weight};
55
use sp_runtime::format;
6+
use substrate_fixed::types::I96F32;
67
use substrate_fixed::types::U64F64;
78

89
use super::*;
@@ -88,6 +89,12 @@ pub fn migrate_rao<T: Config>() -> Weight {
8889

8990
let remaining_lock = lock.saturating_sub(pool_initial_tao);
9091
// Refund the owner for the remaining lock.
92+
SubnetMovingPrice::<T>::insert(
93+
netuid,
94+
I96F32::from_num(EmissionValues::<T>::get(netuid))
95+
.checked_div(I96F32::from_num(1_000_000_000))
96+
.unwrap_or(I96F32::from_num(0.0)),
97+
);
9198
Pallet::<T>::add_balance_to_coldkey_account(&owner, remaining_lock);
9299
SubnetLocked::<T>::insert(netuid, 0); // Clear lock amount.
93100
SubnetTAO::<T>::insert(netuid, pool_initial_tao);

0 commit comments

Comments
 (0)