Skip to content

Commit aa0fb98

Browse files
committed
refactor: secs -> buffer
1 parent de9d74e commit aa0fb98

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,11 @@ pub struct BuilderConfig {
157157

158158
/// Number of seconds before the end of the slot to stop querying for new blocks
159159
#[from_env(
160-
var = "BLOCK_QUERY_CUTOFF_SECS",
160+
var = "BLOCK_QUERY_CUTOFF_BUFFER",
161161
desc = "Number of seconds before the end of the slot to stop querying for new blocks",
162162
default = 2
163163
)]
164-
pub block_query_cutoff_secs: u64,
164+
pub block_query_cutoff_buffer: u64,
165165

166166
/// The slot calculator for the builder.
167167
pub slot_calculator: SlotCalculator,

src/tasks/block/sim.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ impl Simulator {
254254
// remaining, we need to subtract it from the slot duration
255255
// we also subtract 3 seconds to account for the sequencer stopping signing.
256256
let remaining = (self.slot_calculator().slot_duration() - timepoint)
257-
.saturating_sub(self.config.block_query_cutoff_secs);
257+
.saturating_sub(self.config.block_query_cutoff_buffer);
258258

259259
let deadline = Instant::now() + Duration::from_secs(remaining);
260260
deadline.max(Instant::now())

src/test_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub fn setup_test_config() -> Result<BuilderConfig> {
5353
1740681556, // pecorino start timestamp as sane default
5454
0, 1,
5555
),
56-
block_query_cutoff_secs: 2,
56+
block_query_cutoff_buffer: 2,
5757
max_host_gas_coefficient: Some(80),
5858
constants: SignetSystemConstants::pecorino(),
5959
};

0 commit comments

Comments
 (0)