Skip to content

Commit 795d366

Browse files
committed
add tao_emission to stakeinfo runtime
1 parent fd96f59 commit 795d366

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pallets/subtensor/src/rpc_info/stake_info.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use frame_support::pallet_prelude::{Decode, Encode};
33
extern crate alloc;
44
use codec::Compact;
55

6-
#[freeze_struct("4f16c654467bc8b6")]
6+
#[freeze_struct("5cfb3c84c3af3116")]
77
#[derive(Decode, Encode, PartialEq, Eq, Clone, Debug, TypeInfo)]
88
pub struct StakeInfo<AccountId: TypeInfo + Encode + Decode> {
99
hotkey: AccountId,
@@ -12,6 +12,7 @@ pub struct StakeInfo<AccountId: TypeInfo + Encode + Decode> {
1212
stake: Compact<u64>,
1313
locked: Compact<u64>,
1414
emission: Compact<u64>,
15+
tao_emission: Compact<u64>,
1516
drain: Compact<u64>,
1617
is_registered: bool,
1718
}
@@ -38,6 +39,7 @@ impl<T: Config> Pallet<T> {
3839
continue;
3940
}
4041
let emission: u64 = AlphaDividendsPerSubnet::<T>::get(*netuid_i, &hotkey_i);
42+
let tao_emission: u64 = TaoDividendsPerSubnet::<T>::get(*netuid_i, &hotkey_i);
4143
let is_registered: bool =
4244
Self::is_hotkey_registered_on_network(*netuid_i, hotkey_i);
4345
stake_info_for_coldkey.push(StakeInfo {
@@ -47,6 +49,7 @@ impl<T: Config> Pallet<T> {
4749
stake: alpha.into(),
4850
locked: 0.into(),
4951
emission: emission.into(),
52+
tao_emission: tao_emission.into(),
5053
drain: 0.into(),
5154
is_registered,
5255
});
@@ -94,6 +97,7 @@ impl<T: Config> Pallet<T> {
9497
netuid,
9598
);
9699
let emission: u64 = AlphaDividendsPerSubnet::<T>::get(netuid, &hotkey_account);
100+
let tao_emission: u64 = TaoDividendsPerSubnet::<T>::get(netuid, &hotkey_account);
97101
let is_registered: bool = Self::is_hotkey_registered_on_network(netuid, &hotkey_account);
98102

99103
Some(StakeInfo {
@@ -103,6 +107,7 @@ impl<T: Config> Pallet<T> {
103107
stake: alpha.into(),
104108
locked: 0.into(),
105109
emission: emission.into(),
110+
tao_emission: tao_emission.into(),
106111
drain: 0.into(),
107112
is_registered,
108113
})

0 commit comments

Comments
 (0)