Skip to content

Commit

Permalink
Derive Clone for call info types
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy committed Sep 11, 2024
1 parent 49f652d commit ab1ac02
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/blockifier/src/execution/call_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ macro_rules! retdata {
};
}

#[cfg_attr(test, derive(Clone))]
#[cfg_attr(any(test, feature = "testing"), derive(Clone))]
#[derive(Debug, Default, Eq, PartialEq, Serialize)]
pub struct OrderedEvent {
pub order: usize,
Expand Down Expand Up @@ -54,14 +54,14 @@ impl MessageL1CostInfo {
}
}

#[cfg_attr(test, derive(Clone))]
#[cfg_attr(any(test, feature = "testing"), derive(Clone))]
#[derive(Debug, Default, Eq, PartialEq, Serialize)]
pub struct MessageToL1 {
pub to_address: EthAddress,
pub payload: L2ToL1Payload,
}

#[cfg_attr(test, derive(Clone))]
#[cfg_attr(any(test, feature = "testing"), derive(Clone))]
#[derive(Debug, Default, Eq, PartialEq, Serialize)]
pub struct OrderedL2ToL1Message {
pub order: usize,
Expand All @@ -73,7 +73,7 @@ pub fn get_payload_lengths(l2_to_l1_messages: &[OrderedL2ToL1Message]) -> Vec<us
}

/// Represents the effects of executing a single entry point.
#[cfg_attr(test, derive(Clone))]
#[cfg_attr(any(test, feature = "testing"), derive(Clone))]
#[derive(Debug, Default, Eq, PartialEq, Serialize)]
pub struct CallExecution {
pub retdata: Retdata,
Expand Down Expand Up @@ -162,7 +162,7 @@ impl TestExecutionSummary {
}

/// Represents the full effects of executing an entry point, including the inner calls it invoked.
#[derive(Debug, Default, Eq, PartialEq, Serialize)]
#[derive(Debug, Default, Eq, PartialEq, Serialize, Clone)]
pub struct CallInfo {
pub call: CallEntryPoint,
pub execution: CallExecution,
Expand Down

0 comments on commit ab1ac02

Please sign in to comment.