mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-13 23:16:52 +00:00
wait
This commit is contained in:
@@ -39,6 +39,13 @@ pub fn process_deploy(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResul
|
||||
return Err(trace("Not authorized", OreError::NotAuthorized.into()));
|
||||
}
|
||||
|
||||
// Wait until first deploy to start round.
|
||||
if board.end_slot == u64::MAX {
|
||||
board.start_slot = clock.slot;
|
||||
board.end_slot = board.start_slot + 150;
|
||||
round.expires_at = board.end_slot + ONE_WEEK_SLOTS;
|
||||
}
|
||||
|
||||
// Check if signer is the automation executor.
|
||||
let automation = if !automation_info.data_is_empty() {
|
||||
let automation = automation_info
|
||||
|
||||
@@ -47,7 +47,7 @@ pub fn process_reset(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResul
|
||||
round_next.deployed = [0; 25];
|
||||
round_next.slot_hash = [0; 32];
|
||||
round_next.count = [0; 25];
|
||||
round_next.expires_at = clock.slot + 150 + ONE_WEEK_SLOTS;
|
||||
round_next.expires_at = u64::MAX; // clock.slot + 150 + ONE_WEEK_SLOTS;
|
||||
round_next.rent_payer = *signer_info.key;
|
||||
round_next.motherlode = 0;
|
||||
round_next.top_miner = Pubkey::default();
|
||||
@@ -109,7 +109,7 @@ pub fn process_reset(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResul
|
||||
// Update board
|
||||
board.round_id += 1;
|
||||
board.start_slot = clock.slot + 1;
|
||||
board.end_slot = board.start_slot + 150;
|
||||
board.end_slot = u64::MAX; // board.start_slot + 150;
|
||||
|
||||
// Do SOL transfers.
|
||||
round_info.send(total_admin_fee, &fee_collector_info);
|
||||
@@ -220,7 +220,7 @@ pub fn process_reset(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResul
|
||||
// Reset board.
|
||||
board.round_id += 1;
|
||||
board.start_slot = clock.slot + 1;
|
||||
board.end_slot = board.start_slot + 150;
|
||||
board.end_slot = u64::MAX; // board.start_slot + 150;
|
||||
|
||||
// Do SOL transfers.
|
||||
round_info.send(total_admin_fee, &fee_collector_info);
|
||||
|
||||
Reference in New Issue
Block a user