Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use time::{macros::format_description, OffsetDateTime};

use crate::constants::constraint_constants;
pub use crate::constants::{
checkpoint_window_size_in_slots, grace_period_end, slots_per_window, CHECKPOINTS_PER_YEAR,
checkpoint_window_size_in_slots, slots_per_window, CHECKPOINTS_PER_YEAR,
};

// TODO get constants from elsewhere
Expand Down
13 changes: 0 additions & 13 deletions core/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,6 @@ pub fn checkpoint_window_size_in_slots() -> u32 {
size_in_slots as u32
}

pub fn grace_period_end(constants: &v2::MinaBaseProtocolConstantsCheckedValueStableV1) -> u32 {
let slots = {
const NUM_DAYS: u64 = 3;
let n_days_ms = days_to_ms(NUM_DAYS);
let n_days = n_days_ms / constraint_constants().block_window_duration_ms;
(n_days as u32).min(constants.slots_per_epoch.as_u32())
};
match constraint_constants().fork.as_ref() {
None => slots,
Some(fork) => slots + fork.global_slot_since_genesis,
}
}

pub const DEFAULT_GENESIS_TIMESTAMP_MILLISECONDS: u64 = 1707157200000;

pub const PROTOCOL_TRANSACTION_VERSION: u8 = 3;
Expand Down
Loading