Validate config
(&self)
| 41 | impl CommitBoostConfig { |
| 42 | /// Validate config |
| 43 | pub async fn validate(&self) -> Result<()> { |
| 44 | self.pbs.pbs_config.validate(self.chain).await?; |
| 45 | if let Some(signer) = &self.signer { |
| 46 | signer.validate().await?; |
| 47 | } |
| 48 | |
| 49 | if self.relays.iter().any(|r| r.validator_registration_batch_size.is_some()) { |
| 50 | bail!( |
| 51 | "validator_registration_batch_size is now obsolete on a per-relay basis. Please use validator_registration_batch_size in the [pbs] section instead" |
| 52 | ) |
| 53 | } |
| 54 | |
| 55 | Ok(()) |
| 56 | } |
| 57 | |
| 58 | pub fn from_file(path: &PathBuf) -> Result<Self> { |
| 59 | let config: Self = load_from_file(path)?; |
no outgoing calls