Skip to content

Commit

Permalink
refactor(execution): put all create for testing methods under testing…
Browse files Browse the repository at this point in the history
… config

refactor(execution): put all create for testing methods under testing config
  • Loading branch information
meship-starkware committed Jul 29, 2024
1 parent a65d3f9 commit 9dbb7dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions crates/blockifier/src/transaction/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion crates/gateway/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -285,6 +285,7 @@ impl SerializeConfig for StatefulTransactionValidatorConfig {
}
}

#[cfg(any(test, feature = "testing"))]
impl StatefulTransactionValidatorConfig {
pub fn create_for_testing() -> Self {
StatefulTransactionValidatorConfig {
Expand Down

0 comments on commit 9dbb7dc

Please sign in to comment.