diff --git a/src/perms/builders.rs b/src/perms/builders.rs index 6c73fe3..8e0237a 100644 --- a/src/perms/builders.rs +++ b/src/perms/builders.rs @@ -170,7 +170,17 @@ impl Builders { /// round-robin design, where each builder is allowed to perform an action /// at a specific slot, and what builder is allowed changes with each slot. pub fn is_builder_permissioned(&self, sub: &str) -> Result<(), BuilderPermissionError> { - self.check_query_bounds()?; + let current_slot_time = self.calc().current_timepoint_within_slot(); + let current_builder = self.current_builder().sub.clone(); + + if current_slot_time < self.config.block_query_start() { + tracing::debug!(current_slot_time, current_builder, "block too early"); + return Err(BuilderPermissionError::ActionAttemptTooEarly); + } + if current_slot_time > self.config.block_query_cutoff() { + tracing::debug!(current_slot_time, current_builder, "block too late"); + return Err(BuilderPermissionError::ActionAttemptTooLate); + } if sub != self.current_builder().sub { tracing::debug!(