Skip to content

Commit 08cc6fb

Browse files
committed
fix: correct total active stakes
1 parent 0c2602b commit 08cc6fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/block_vrf_validator/src/snapshot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl From<(&SPOStateMessage, &SPOStakeDistributionMessage)> for Snapshot {
2626
.collect();
2727
let active_stakes: HashMap<PoolId, u64> =
2828
spdd_msg.spos.iter().map(|(pool_id, stake)| (*pool_id, stake.live)).collect();
29-
let total_active_stakes = spdd_msg.spos.iter().map(|(_, stake)| stake.active).sum();
29+
let total_active_stakes = active_stakes.values().sum();
3030
Self {
3131
active_spos,
3232
active_stakes,

0 commit comments

Comments
 (0)