Skip to content

Commit

Permalink
revert rename user_add_network
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnReedV committed Aug 26, 2024
1 parent 619757f commit 5af9888
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pallets/subtensor/src/coinbase/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ impl<T: Config> Pallet<T> {
/// * 'NotEnoughBalanceToStake': If there isn't enough balance to stake for network registration.
/// * 'BalanceWithdrawalError': If an error occurs during balance withdrawal for network registration.
///
pub fn user_add_network_with_identity(
pub fn user_add_network(
origin: T::RuntimeOrigin,
identity: Option<SubnetIdentityOf>,
) -> dispatch::DispatchResult {
Expand Down
4 changes: 2 additions & 2 deletions pallets/subtensor/src/macros/dispatches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ mod dispatches {
.saturating_add(T::DbWeight::get().reads(16))
.saturating_add(T::DbWeight::get().writes(30)), DispatchClass::Operational, Pays::No))]
pub fn register_network(origin: OriginFor<T>) -> DispatchResult {
Self::user_add_network_with_identity(origin, None)
Self::user_add_network(origin, None)
}

/// Facility extrinsic for user to get taken from faucet
Expand Down Expand Up @@ -1208,7 +1208,7 @@ mod dispatches {
origin: OriginFor<T>,
identity: Option<SubnetIdentityOf>,
) -> DispatchResult {
Self::user_add_network_with_identity(origin, identity)
Self::user_add_network(origin, identity)
}
}
}
4 changes: 2 additions & 2 deletions pallets/subtensor/tests/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,15 +1012,15 @@ fn test_user_add_network_with_identity_fields_ok() {

SubtensorModule::add_balance_to_coldkey_account(&coldkey_1, balance_1);

assert_ok!(SubtensorModule::user_add_network_with_identity(
assert_ok!(SubtensorModule::user_add_network(
RuntimeOrigin::signed(coldkey_1),
Some(identity_value_1.clone())
));

let balance_2 = SubtensorModule::get_network_lock_cost() + 10_000;
SubtensorModule::add_balance_to_coldkey_account(&coldkey_2, balance_2);

assert_ok!(SubtensorModule::user_add_network_with_identity(
assert_ok!(SubtensorModule::user_add_network(
RuntimeOrigin::signed(coldkey_2),
Some(identity_value_2.clone())
));
Expand Down

0 comments on commit 5af9888

Please sign in to comment.