Skip to content

Commit 1cb4241

Browse files
committed
remove log
1 parent 4d89bef commit 1cb4241

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

pallets/subtensor/src/staking/stake_utils.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -861,10 +861,6 @@ impl<T: Config> Pallet<T> {
861861
netuid,
862862
alpha,
863863
);
864-
log::error!(
865-
"actual_alpha_decrease is {} ",
866-
actual_alpha_decrease.to_u64()
867-
);
868864

869865
// Increase alpha on destination keys
870866
let actual_alpha_moved = Self::increase_stake_for_hotkey_and_coldkey_on_subnet(
@@ -873,7 +869,6 @@ impl<T: Config> Pallet<T> {
873869
netuid,
874870
actual_alpha_decrease,
875871
);
876-
log::error!("actual_alpha_moved is {} ", actual_alpha_moved.to_u64());
877872

878873
// Calculate TAO equivalent based on current price (it is accurate because
879874
// there's no slippage in this move)
@@ -883,7 +878,6 @@ impl<T: Config> Pallet<T> {
883878
.saturating_mul(U96F32::saturating_from_num(actual_alpha_moved))
884879
.saturating_to_num::<u64>()
885880
.into();
886-
log::error!("tao_equivalent is {} ", tao_equivalent.to_u64());
887881

888882
// Ensure tao_equivalent is above DefaultMinStake
889883
ensure!(
@@ -1113,7 +1107,6 @@ impl<T: Config> Pallet<T> {
11131107
maybe_allow_partial: Option<bool>,
11141108
check_transfer_toggle: bool,
11151109
) -> Result<(), Error<T>> {
1116-
11171110
// Ensure stake transition is actually happening
11181111
if origin_coldkey == destination_coldkey && origin_hotkey == destination_hotkey {
11191112
ensure!(origin_netuid != destination_netuid, Error::<T>::SameNetuid);
@@ -1125,7 +1118,6 @@ impl<T: Config> Pallet<T> {
11251118
origin_netuid.into(),
11261119
)?;
11271120

1128-
11291121
// Ensure that both subnets exist.
11301122
ensure!(
11311123
Self::if_subnet_exist(origin_netuid),
@@ -1139,13 +1131,11 @@ impl<T: Config> Pallet<T> {
11391131
);
11401132
}
11411133

1142-
11431134
ensure!(
11441135
SubtokenEnabled::<T>::get(origin_netuid),
11451136
Error::<T>::SubtokenDisabled
11461137
);
11471138

1148-
11491139
ensure!(
11501140
SubtokenEnabled::<T>::get(destination_netuid),
11511141
Error::<T>::SubtokenDisabled
@@ -1194,14 +1184,12 @@ impl<T: Config> Pallet<T> {
11941184
// slippage over desired
11951185
if let Some(allow_partial) = maybe_allow_partial {
11961186
if !allow_partial {
1197-
11981187
ensure!(alpha_amount <= max_amount, Error::<T>::SlippageTooHigh);
11991188
}
12001189
}
12011190
}
12021191

12031192
if check_transfer_toggle {
1204-
12051193
// Ensure transfer is toggled.
12061194
ensure!(
12071195
TransferToggle::<T>::get(origin_netuid),

precompiles/src/staking.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,7 @@ where
194194
destination_netuid: U256,
195195
amount_alpha: U256,
196196
) -> EvmResult<()> {
197-
log::error!("++++++++++++++++++ {} {}", file!(), line!());
198197
let account_id = handle.caller_account_id::<R>();
199-
log::error!("account id is {:?} ", &account_id);
200-
log::error!("destination_coldkey is {:?} ", &destination_coldkey);
201-
log::error!("hotkey is {:?} ", &hotkey);
202-
log::error!("origin_netuid is {:?} ", &origin_netuid);
203-
log::error!("destination_netuid is {:?} ", &destination_netuid);
204-
log::error!("amount_alpha is {:?} ", &amount_alpha);
205198
let destination_coldkey = R::AccountId::from(destination_coldkey.0);
206199
let hotkey = R::AccountId::from(hotkey.0);
207200
let origin_netuid = try_u16_from_u256(origin_netuid)?;

0 commit comments

Comments
 (0)