Skip to content

Commit 96939a7

Browse files
authored
Merge pull request #1454 from tb-team-dev-2/feat/actual-fee-in-events
Feat/actual fee in events
2 parents e8d73bc + 17dc5dd commit 96939a7

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

pallets/subtensor/src/macros/events.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ mod events {
1414
/// a network is removed.
1515
NetworkRemoved(u16),
1616
/// stake has been transferred from the a coldkey account onto the hotkey staking account.
17-
StakeAdded(T::AccountId, T::AccountId, u64, u64, u16),
17+
StakeAdded(T::AccountId, T::AccountId, u64, u64, u16, u64),
1818
/// stake has been removed from the hotkey staking account onto the coldkey account.
19-
StakeRemoved(T::AccountId, T::AccountId, u64, u64, u16),
19+
StakeRemoved(T::AccountId, T::AccountId, u64, u64, u16, u64),
2020
/// stake has been moved from origin (hotkey, subnet ID) to destination (hotkey, subnet ID) of this amount (in TAO).
2121
StakeMoved(T::AccountId, T::AccountId, u16, T::AccountId, u16, u64),
2222
/// a caller successfully sets their weights on a subnetwork.

pallets/subtensor/src/staking/stake_utils.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -794,14 +794,16 @@ impl<T: Config> Pallet<T> {
794794
tao_unstaked,
795795
actual_alpha_decrease,
796796
netuid,
797+
actual_fee,
797798
));
798799
log::debug!(
799-
"StakeRemoved( coldkey: {:?}, hotkey:{:?}, tao: {:?}, alpha:{:?}, netuid: {:?} )",
800+
"StakeRemoved( coldkey: {:?}, hotkey:{:?}, tao: {:?}, alpha:{:?}, netuid: {:?}, fee: {:?} )",
800801
coldkey.clone(),
801802
hotkey.clone(),
802803
tao_unstaked,
803804
actual_alpha_decrease,
804-
netuid
805+
netuid,
806+
actual_fee
805807
);
806808

807809
// Step 6: Return the amount of TAO unstaked.
@@ -857,14 +859,16 @@ impl<T: Config> Pallet<T> {
857859
tao_staked,
858860
actual_alpha,
859861
netuid,
862+
actual_fee,
860863
));
861864
log::debug!(
862-
"StakeAdded( coldkey: {:?}, hotkey:{:?}, tao: {:?}, alpha:{:?}, netuid: {:?} )",
865+
"StakeAdded( coldkey: {:?}, hotkey:{:?}, tao: {:?}, alpha:{:?}, netuid: {:?}, fee: {:?} )",
863866
coldkey.clone(),
864867
hotkey.clone(),
865868
tao_staked,
866869
actual_alpha,
867-
netuid
870+
netuid,
871+
actual_fee
868872
);
869873

870874
// Step 7: Return the amount of alpha staked

0 commit comments

Comments
 (0)