pub fn validate_horizon(horizon: usize) -> Result<()>
Enforce 1 <= horizon <= MAX_HORIZON.
1 <= horizon <= MAX_HORIZON