Skip to content

Commit 3f72efe

Browse files
authored
fix: inaccurate docs on perms config (#42)
* fix: inaccurate docs on perms config * update: slot duration
1 parent b26969b commit 3f72efe

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/perms/config.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ pub struct SlotAuthzConfig {
1010
/// number for a given timestamp.
1111
calc: SlotCalculator,
1212
/// The block query cutoff time in seconds. This is the slot second after
13-
/// which requests will not be serviced. E.g. a value of 1 means that
14-
/// requests will not be serviced for the last second of any given slot.
13+
/// which requests will not be serviced. E.g. For a slot duration of 12,
14+
/// a value of 10 means that requests will not be serviced for the last 2 seconds
15+
/// of any given slot.
1516
///
16-
/// On loading from env, the number will be clamped between 0 and 11, as
17-
/// the slot duration is 12 seconds.
17+
/// On loading from env, the number will be clamped between 0 and slot_duration,
18+
/// which is generally expected to be 12 seconds.
1819
#[from_env(
1920
var = "BLOCK_QUERY_CUTOFF",
2021
desc = "The block query cutoff time in seconds."
@@ -24,8 +25,8 @@ pub struct SlotAuthzConfig {
2425
/// which requests will not be serviced. E.g. a value of 1 means that
2526
/// requests will not be serviced for the first second of any given slot.
2627
///
27-
/// On loading from env, the number will be clamped between 0 and 11, as
28-
/// the slot duration is 12 seconds.
28+
/// On loading from env, the number will be clamped between 0 and slot_duration, as
29+
/// which is generally expected to be 12 seconds.
2930
#[from_env(
3031
var = "BLOCK_QUERY_START",
3132
desc = "The block query start time in seconds."

0 commit comments

Comments
 (0)