Skip to content

Commit

Permalink
fix(transaction): add clone to declare tx
Browse files Browse the repository at this point in the history
  • Loading branch information
meship-starkware committed Jul 28, 2024
1 parent d2d9fa4 commit d66bb5c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/blockifier/src/transaction/account_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ mod flavors_test;
mod post_execution_test;

/// Represents a paid Starknet transaction.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub enum AccountTransaction {
Declare(DeclareTransaction),
DeployAccount(DeployAccountTransaction),
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/transaction/transaction_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(Debug, Clone, derive_more::From)]
pub enum Transaction {
AccountTransaction(AccountTransaction),
L1HandlerTransaction(L1HandlerTransaction),
Expand Down
4 changes: 2 additions & 2 deletions crates/blockifier/src/transaction/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ pub trait ValidatableTransaction {
) -> TransactionExecutionResult<Option<CallInfo>>;
}

#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct DeclareTransaction {
pub tx: starknet_api::transaction::DeclareTransaction,
pub tx_hash: TransactionHash,
Expand Down Expand Up @@ -495,7 +495,7 @@ impl TransactionInfoCreator for InvokeTransaction {
}
}

#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct L1HandlerTransaction {
pub tx: starknet_api::transaction::L1HandlerTransaction,
pub tx_hash: TransactionHash,
Expand Down
2 changes: 1 addition & 1 deletion crates/papyrus_monitoring_gateway/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ async fn node_config_by_secret(
async fn metrics(prometheus_handle: Option<PrometheusHandle>) -> Response {
match prometheus_handle {
Some(handle) => {
Collector::default().prefix(PROCESS_METRICS_PREFIX).collect();
Collector::new(PROCESS_METRICS_PREFIX).collect();
handle.render().into_response()
}
None => StatusCode::METHOD_NOT_ALLOWED.into_response(),
Expand Down

0 comments on commit d66bb5c

Please sign in to comment.