Skip to content

Commit ea7b7e3

Browse files
committed
remove logs
1 parent 1cb4241 commit ea7b7e3

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

pallets/subtensor/src/staking/move_stake.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ impl<T: Config> Pallet<T> {
126126
destination_netuid: NetUid,
127127
alpha_amount: AlphaCurrency,
128128
) -> dispatch::DispatchResult {
129-
log::error!("alpha_amount is {:?} ", alpha_amount.to_u64());
130129
// Ensure the extrinsic is signed by the origin_coldkey.
131130
let coldkey = ensure_signed(origin)?;
132131

@@ -145,8 +144,6 @@ impl<T: Config> Pallet<T> {
145144
false,
146145
)?;
147146

148-
log::error!("tao_moved is {} ", tao_moved.to_u64());
149-
150147
// 9. Emit an event for logging/monitoring.
151148
log::debug!(
152149
"StakeTransferred(origin_coldkey: {coldkey:?}, destination_coldkey: {destination_coldkey:?}, hotkey: {hotkey:?}, origin_netuid: {origin_netuid:?}, destination_netuid: {destination_netuid:?}, amount: {tao_moved:?})"
@@ -161,8 +158,6 @@ impl<T: Config> Pallet<T> {
161158
tao_moved,
162159
));
163160

164-
log::error!("tao_moved {}", tao_moved.to_u64());
165-
166161
// 10. Return success.
167162
Ok(())
168163
}
@@ -321,7 +316,6 @@ impl<T: Config> Pallet<T> {
321316
origin_coldkey,
322317
origin_netuid,
323318
);
324-
325319
let alpha_amount = alpha_amount.min(alpha_available);
326320

327321
// Calculate the maximum amount that can be executed
@@ -335,7 +329,6 @@ impl<T: Config> Pallet<T> {
335329
alpha_amount
336330
};
337331

338-
log::error!("alpha_amount is {:?} ", &max_amount);
339332
// Validate user input
340333
Self::validate_stake_transition(
341334
origin_coldkey,
@@ -357,8 +350,6 @@ impl<T: Config> Pallet<T> {
357350
max_amount
358351
};
359352

360-
log::error!("move_amount is {:?} ", move_amount.to_u64());
361-
362353
if origin_netuid != destination_netuid {
363354
// Any way to charge fees that works
364355
let drop_fee_origin = origin_netuid == NetUid::ROOT;
@@ -373,7 +364,6 @@ impl<T: Config> Pallet<T> {
373364
T::SwapInterface::min_price().into(),
374365
drop_fee_origin,
375366
)?;
376-
log::error!("tao_unstaked is {:?} ", tao_unstaked.to_u64());
377367

378368
// Stake the unstaked amount into the destination.
379369
// Because of the fee, the tao_unstaked may be too low if initial stake is low. In that case,

pallets/subtensor/src/staking/stake_utils.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,6 @@ impl<T: Config> Pallet<T> {
11231123
Self::if_subnet_exist(origin_netuid),
11241124
Error::<T>::SubnetNotExists
11251125
);
1126-
11271126
if origin_netuid != destination_netuid {
11281127
ensure!(
11291128
Self::if_subnet_exist(destination_netuid),
@@ -1159,7 +1158,6 @@ impl<T: Config> Pallet<T> {
11591158
origin_coldkey,
11601159
origin_netuid,
11611160
);
1162-
11631161
ensure!(
11641162
alpha_amount <= origin_alpha,
11651163
Error::<T>::NotEnoughStakeToWithdraw
@@ -1195,7 +1193,6 @@ impl<T: Config> Pallet<T> {
11951193
TransferToggle::<T>::get(origin_netuid),
11961194
Error::<T>::TransferDisallowed
11971195
);
1198-
11991196
if origin_netuid != destination_netuid {
12001197
ensure!(
12011198
TransferToggle::<T>::get(destination_netuid),

0 commit comments

Comments
 (0)