Skip to content

Commit 463839f

Browse files
committed
ensure 0 key is specified for rejections timeout
1 parent 4f4b584 commit 463839f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

stackslib/src/config/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2749,9 +2749,12 @@ impl MinerConfigFile {
27492749
for (slice, seconds) in block_rejection_timeout_items.iter() {
27502750
match slice.parse::<u64>() {
27512751
Ok(slice_slot) => rejection_timeout_durations.insert(slice_slot, Duration::from_secs(*seconds)),
2752-
Err(e) => panic!("block_rejection_timeout_items keys must be unsigned integers: {}", e)
2752+
Err(e) => panic!("block_rejection_timeout_steps keys must be unsigned integers: {}", e)
27532753
};
27542754
}
2755+
if !rejection_timeout_durations.contains_key(&0) {
2756+
panic!("block_rejection_timeout_steps requires a definition for the '0' key/step");
2757+
}
27552758
rejection_timeout_durations
27562759
} else{
27572760
miner_default_config.block_rejection_timeout_steps

0 commit comments

Comments
 (0)