Skip to content

Commit

Permalink
chore(blockifier): a simple code cleanup in signature_length()
Browse files Browse the repository at this point in the history
  • Loading branch information
avivg-starkware committed Nov 20, 2024
1 parent 9c505d3 commit 8b701d7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions crates/blockifier/src/transaction/account_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub struct AccountTransaction {
pub tx: Transaction,
only_query: bool,
}

// TODO(AvivG): create additional macro that returns a reference.
macro_rules! implement_account_tx_inner_getters {
($(($field:ident, $field_type:ty)),*) => {
$(pub fn $field(&self) -> $field_type {
Expand Down Expand Up @@ -227,13 +227,7 @@ impl AccountTransaction {
}

pub fn signature_length(&self) -> usize {
let signature = match &self.tx {
Transaction::Declare(tx) => tx.signature(),
Transaction::DeployAccount(tx) => tx.signature(),
Transaction::Invoke(tx) => tx.signature(),
};

signature.0.len()
self.signature().0.len()
}

pub fn tx_hash(&self) -> TransactionHash {
Expand Down

0 comments on commit 8b701d7

Please sign in to comment.