From cc8166f1dc75062d94c4729443b7e029afb872b4 Mon Sep 17 00:00:00 2001 From: meship-starkware Date: Tue, 23 Jul 2024 13:27:28 +0300 Subject: [PATCH] fix(transaction): add clone to declare tx --- crates/blockifier/src/transaction/account_transaction.rs | 2 +- crates/blockifier/src/transaction/transaction_execution.rs | 2 +- crates/blockifier/src/transaction/transactions.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/blockifier/src/transaction/account_transaction.rs b/crates/blockifier/src/transaction/account_transaction.rs index 56ecba63bf..d98cf2ffda 100644 --- a/crates/blockifier/src/transaction/account_transaction.rs +++ b/crates/blockifier/src/transaction/account_transaction.rs @@ -63,7 +63,7 @@ mod flavors_test; mod post_execution_test; /// Represents a paid Starknet transaction. -#[derive(Debug)] +#[derive(Clone, Debug)] pub enum AccountTransaction { Declare(DeclareTransaction), DeployAccount(DeployAccountTransaction), diff --git a/crates/blockifier/src/transaction/transaction_execution.rs b/crates/blockifier/src/transaction/transaction_execution.rs index 9d0b209c7b..a2f6bf263d 100644 --- a/crates/blockifier/src/transaction/transaction_execution.rs +++ b/crates/blockifier/src/transaction/transaction_execution.rs @@ -30,7 +30,7 @@ use crate::transaction::transactions::{ }; // TODO: Move into transaction.rs, makes more sense to be defined there. -#[derive(Debug, derive_more::From)] +#[derive(Clone, Debug, derive_more::From)] pub enum Transaction { AccountTransaction(AccountTransaction), L1HandlerTransaction(L1HandlerTransaction), diff --git a/crates/blockifier/src/transaction/transactions.rs b/crates/blockifier/src/transaction/transactions.rs index 830efbd7b3..9a7f39865b 100644 --- a/crates/blockifier/src/transaction/transactions.rs +++ b/crates/blockifier/src/transaction/transactions.rs @@ -128,7 +128,7 @@ pub trait ValidatableTransaction { ) -> TransactionExecutionResult>; } -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct DeclareTransaction { pub tx: starknet_api::transaction::DeclareTransaction, pub tx_hash: TransactionHash, @@ -495,7 +495,7 @@ impl TransactionInfoCreator for InvokeTransaction { } } -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct L1HandlerTransaction { pub tx: starknet_api::transaction::L1HandlerTransaction, pub tx_hash: TransactionHash,