mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-13 23:16:52 +00:00
expiry
This commit is contained in:
@@ -53,8 +53,8 @@ pub fn process_checkpoint(accounts: &[AccountInfo<'_>], _data: &[u8]) -> Program
|
||||
|
||||
// Calculate bot fee.
|
||||
let mut bot_fee = 0;
|
||||
if clock.slot >= round.expires_at - ONE_DAY_SLOTS {
|
||||
// The round expires in less than 24h.
|
||||
if clock.slot >= round.expires_at - TWELVE_HOURS_SLOTS {
|
||||
// The round expires in less than 12h.
|
||||
// Anyone may checkpoint this account and collect the bot fee.
|
||||
bot_fee = miner.checkpoint_fee;
|
||||
miner.checkpoint_fee = 0;
|
||||
|
||||
@@ -38,7 +38,7 @@ pub fn process_deploy(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResul
|
||||
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;
|
||||
round.expires_at = board.end_slot + ONE_DAY_SLOTS;
|
||||
}
|
||||
|
||||
// Check if signer is the automation executor.
|
||||
|
||||
Reference in New Issue
Block a user