diff --git a/crates/blockifier/src/transaction/transactions.rs b/crates/blockifier/src/transaction/transactions.rs index 830efbd7b3..55b6536336 100644 --- a/crates/blockifier/src/transaction/transactions.rs +++ b/crates/blockifier/src/transaction/transactions.rs @@ -508,6 +508,7 @@ impl L1HandlerTransaction { self.tx.calldata.0.len() - 1 } + #[cfg(any(test, feature = "testing"))] pub fn create_for_testing(l1_fee: Fee, contract_address: ContractAddress) -> Self { let calldata = calldata![ Felt::from(0x123), // from_address. diff --git a/crates/gateway/src/config.rs b/crates/gateway/src/config.rs index 49970fa7a0..1f3b504774 100644 --- a/crates/gateway/src/config.rs +++ b/crates/gateway/src/config.rs @@ -207,7 +207,7 @@ impl Default for ChainInfoConfig { ChainInfo::default().into() } } - +#[cfg(any(test, feature = "testing"))] impl ChainInfoConfig { pub fn create_for_testing() -> Self { BlockContext::create_for_testing().chain_info().clone().into() @@ -285,6 +285,7 @@ impl SerializeConfig for StatefulTransactionValidatorConfig { } } +#[cfg(any(test, feature = "testing"))] impl StatefulTransactionValidatorConfig { pub fn create_for_testing() -> Self { StatefulTransactionValidatorConfig {