MCPcopy Create free account
hub / github.com/Commit-Boost/commit-boost-client / validate

Method validate

crates/common/src/config/mod.rs:43–56  ·  view source on GitHub ↗

Validate config

(&self)

Source from the content-addressed store, hash-verified

41impl 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)?;

Calls

no outgoing calls