Skip to content

Commit 21817cd

Browse files
committed
fix: include rewards in pool's live stake info
1 parent 23dc317 commit 21817cd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

common/src/stake_addresses.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ impl StakeAddressMap {
120120
self.inner.par_iter().for_each(|(_, sas)| {
121121
total_live_stakes.fetch_add(sas.utxo_value, std::sync::atomic::Ordering::Relaxed);
122122
if sas.delegated_spo.as_ref().map(|d_spo| d_spo.eq(spo)).unwrap_or(false) {
123-
live_stake.fetch_add(sas.utxo_value, std::sync::atomic::Ordering::Relaxed);
123+
live_stake.fetch_add(
124+
sas.utxo_value + sas.rewards,
125+
std::sync::atomic::Ordering::Relaxed,
126+
);
124127
live_delegators.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
125128
}
126129
});

0 commit comments

Comments
 (0)