Skip to content

Commit c6eafce

Browse files
committed
chore: add CHAIN_NAME to inventory
1 parent 25122fb commit c6eafce

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/utils/calc.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,20 +267,25 @@ impl FromEnv for SlotCalculator {
267267

268268
fn inventory() -> Vec<&'static EnvItemInfo> {
269269
vec![
270+
&EnvItemInfo {
271+
var: "CHAIN_NAME",
272+
description: "The name of the chain. If set, the other environment variables are ignored.",
273+
optional: true,
274+
},
270275
&EnvItemInfo {
271276
var: "START_TIMESTAMP",
272-
description: "The start timestamp of the chain in seconds",
273-
optional: false,
277+
description: "The start timestamp of the chain in seconds. Required if CHAIN_NAME is not set.",
278+
optional: true,
274279
},
275280
&EnvItemInfo {
276281
var: "SLOT_OFFSET",
277-
description: "The number of the slot containing the start timestamp",
278-
optional: false,
282+
description: "The number of the slot containing the start timestamp. Required if CHAIN_NAME is not set.",
283+
optional: true,
279284
},
280285
&EnvItemInfo {
281286
var: "SLOT_DURATION",
282-
description: "The slot duration of the chain in seconds",
283-
optional: false,
287+
description: "The slot duration of the chain in seconds. Required if CHAIN_NAME is not set.",
288+
optional: true,
284289
},
285290
]
286291
}

0 commit comments

Comments
 (0)