Skip to content

Commit

Permalink
refactor(transaction): add common getters to tramsaction
Browse files Browse the repository at this point in the history
  • Loading branch information
meship-starkware committed Aug 21, 2024
1 parent a57ad02 commit abb33f7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/blockifier/src/transaction/transaction_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ impl Transaction {
_ => unimplemented!(),
}
}

pub fn tx_hash(tx: &Transaction) -> TransactionHash {
match tx {
Transaction::AccountTransaction(tx) => tx.tx_hash(),
Transaction::L1HandlerTransaction(tx) => tx.tx_hash,
}
}
}

impl TransactionInfoCreator for Transaction {
Expand Down

0 comments on commit abb33f7

Please sign in to comment.