diff --git a/api/src/event.rs b/api/src/event.rs index 91ff0bf..8164428 100644 --- a/api/src/event.rs +++ b/api/src/event.rs @@ -25,6 +25,9 @@ pub struct ResetEvent { /// The top miner of the round. pub top_miner: Pubkey, + /// The number of miners on the winning square. + pub num_winners: u64, + /// The total amount of SOL prospected in the round. pub total_prospects: u64, diff --git a/program/src/reset.rs b/program/src/reset.rs index 0ad7ca5..b32472e 100644 --- a/program/src/reset.rs +++ b/program/src/reset.rs @@ -55,6 +55,7 @@ pub fn process_reset(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResul end_slot: board.end_slot, winning_square: winning_square as u64, top_miner: board.top_miner, + num_winners: 0, total_prospects: board.total_prospects, total_vaulted: board.total_vaulted, total_winnings: board.total_winnings, @@ -151,6 +152,7 @@ pub fn process_reset(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResul end_slot: board.end_slot, winning_square: winning_square as u64, top_miner: board.top_miner, + num_winners: square.count[winning_square], total_prospects: board.total_prospects, total_vaulted: board.total_vaulted, total_winnings: board.total_winnings,