Skip to content

Commit 818cea3

Browse files
apollo_gateway: set missing config validations on config members (#12703)
1 parent e8ade07 commit 818cea3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

crates/apollo_batcher_config/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ impl SerializeConfig for FirstBlockWithPartialBlockHash {
228228
#[derive(Clone, Debug, Serialize, Deserialize, Validate, PartialEq)]
229229
#[validate(schema(function = "validate_batcher_static_config"))]
230230
pub struct BatcherStaticConfig {
231-
// TODO(Arni): Set nested validation for storage config.
231+
#[validate(nested)]
232232
pub storage: StorageConfig,
233233
pub outstream_content_buffer_size: usize,
234234
pub input_stream_content_buffer_size: usize,

crates/apollo_gateway_config/src/config.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ use crate::compiler_version::VersionId;
2424

2525
const DEFAULT_BUCKET_NAME: &str = "proof-archive";
2626

27-
// TODO(Arni): Set nested validation for other members of this struct.
2827
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize, Validate)]
2928
pub struct GatewayStaticConfig {
29+
#[validate(nested)]
3030
pub stateless_tx_validator_config: StatelessTransactionValidatorConfig,
31+
#[validate(nested)]
3132
pub stateful_tx_validator_config: StatefulTransactionValidatorConfig,
3233
#[validate(nested)]
3334
pub contract_class_manager_config: ContractClassManagerConfig,
@@ -292,7 +293,7 @@ impl SerializeConfig for StatefulTransactionValidatorConfig {
292293
}
293294
}
294295

295-
#[derive(Clone, Debug, Serialize, Deserialize, Validate, PartialEq)]
296+
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
296297
pub struct ProofArchiveWriterConfig {
297298
pub bucket_name: String,
298299
}

0 commit comments

Comments
 (0)