Skip to content

Commit b17e3b0

Browse files
authored
chore: Remove unused grace_period_end function (#862)
1 parent 452d7ff commit b17e3b0

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

core/src/consensus.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use time::{macros::format_description, OffsetDateTime};
77

88
use crate::constants::constraint_constants;
99
pub use crate::constants::{
10-
checkpoint_window_size_in_slots, grace_period_end, slots_per_window, CHECKPOINTS_PER_YEAR,
10+
checkpoint_window_size_in_slots, slots_per_window, CHECKPOINTS_PER_YEAR,
1111
};
1212

1313
// TODO get constants from elsewhere

core/src/constants.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,19 +107,6 @@ pub fn checkpoint_window_size_in_slots() -> u32 {
107107
size_in_slots as u32
108108
}
109109

110-
pub fn grace_period_end(constants: &v2::MinaBaseProtocolConstantsCheckedValueStableV1) -> u32 {
111-
let slots = {
112-
const NUM_DAYS: u64 = 3;
113-
let n_days_ms = days_to_ms(NUM_DAYS);
114-
let n_days = n_days_ms / constraint_constants().block_window_duration_ms;
115-
(n_days as u32).min(constants.slots_per_epoch.as_u32())
116-
};
117-
match constraint_constants().fork.as_ref() {
118-
None => slots,
119-
Some(fork) => slots + fork.global_slot_since_genesis,
120-
}
121-
}
122-
123110
pub const DEFAULT_GENESIS_TIMESTAMP_MILLISECONDS: u64 = 1707157200000;
124111

125112
pub const PROTOCOL_TRANSACTION_VERSION: u8 = 3;

0 commit comments

Comments
 (0)