Skip to content

Commit 4dc5f00

Browse files
committed
Merge branch 'main' into fix/share-pool-precision
2 parents f06e95e + 85f72d9 commit 4dc5f00

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pallets/subtensor/src/staking/stake_utils.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,15 @@ impl<T: Config> Pallet<T> {
559559
alpha_share_pool.sim_update_value_for_one(amount as i64)
560560
}
561561

562+
pub fn try_increase_stake_for_hotkey_and_coldkey_on_subnet(
563+
hotkey: &T::AccountId,
564+
netuid: u16,
565+
amount: u64,
566+
) -> bool {
567+
let mut alpha_share_pool = Self::get_alpha_share_pool(hotkey.clone(), netuid);
568+
alpha_share_pool.sim_update_value_for_one(amount as i64)
569+
}
570+
562571
/// Sell shares in the hotkey on a given subnet
563572
///
564573
/// The function updates share totals given current prices.

0 commit comments

Comments
 (0)