Builds validated configuration for the builder transaction insertion RPC. # Errors Returns an error when the shadow injection sample rate is out of range.
(&self)
| 400 | /// |
| 401 | /// Returns an error when the shadow injection sample rate is out of range. |
| 402 | pub fn builder_api_config(&self) -> eyre::Result<BuilderApiExtensionConfig> { |
| 403 | let shadow_validity = if self.shadow_validity_injection_enabled { |
| 404 | ShadowValidityConfig::enabled(self.shadow_validity_injection_sample_rate_bps)? |
| 405 | } else { |
| 406 | ShadowValidityConfig::disabled() |
| 407 | }; |
| 408 | Ok(BuilderApiExtensionConfig::new(self.validity_max_predicates) |
| 409 | .with_validity_signature_mode(self.validity_signature_mode) |
| 410 | .with_shadow_validity(shadow_validity)) |
| 411 | } |
| 412 | |
| 413 | /// Converts these CLI arguments into a [`BuilderConfig`] using the given shared metering |
| 414 | /// provider. The same provider must also be passed to the RPC extension so that the |