code/pallets/subtensor/src/staking/account.rs

account.rs

13 lines · 326 bytes · 19a6485969RawGitHub
use super::*;

impl<T: Config> Pallet<T> {
    pub fn do_try_associate_hotkey(
        coldkey: &T::AccountId,
        hotkey: &T::AccountId,
    ) -> DispatchResult {
        // Ensure the hotkey is not already associated with a coldkey
        Self::create_account_if_non_existent(coldkey, hotkey)?;

        Ok(())
    }
}