num winners

This commit is contained in:
Hardhat Chad
2025-09-19 11:12:13 -07:00
parent 284894f1a1
commit 8ccab18002
2 changed files with 5 additions and 0 deletions

View File

@@ -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,

View File

@@ -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,