mirror of
https://github.com/tig-foundation/tig-monorepo.git
synced 2026-02-21 10:27:49 +08:00
Only process votes for players who have active deposits.
This commit is contained in:
parent
3138f31c00
commit
715da6cd69
@ -148,6 +148,7 @@ pub(crate) async fn update(cache: &mut AddBlockCache) {
|
||||
let active_algorithm_ids = &block_data.active_ids[&ActiveType::Algorithm];
|
||||
let active_breakthrough_ids = &block_data.active_ids[&ActiveType::Breakthrough];
|
||||
let active_challenge_ids = &block_data.active_ids[&ActiveType::Challenge];
|
||||
let active_player_ids = &block_data.active_ids[&ActiveType::Player];
|
||||
|
||||
// update votes
|
||||
for breakthrough_state in voting_breakthroughs_state.values_mut() {
|
||||
@ -156,7 +157,8 @@ pub(crate) async fn update(cache: &mut AddBlockCache) {
|
||||
(false, PreciseNumber::from(0)),
|
||||
]);
|
||||
}
|
||||
for (player_id, player_state) in active_players_state.iter() {
|
||||
for player_id in active_player_ids.iter() {
|
||||
let player_state = &active_players_state[player_id];
|
||||
let player_data = &active_players_block_data[player_id];
|
||||
for (breakthrough_id, vote) in player_state.votes.iter() {
|
||||
let yes = vote.value;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user