Skip to content

Commit ebbbd61

Browse files
blockifier: get proof_facts_length from tx
1 parent 18019c2 commit ebbbd61

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

crates/blockifier/src/fee/receipt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ impl TransactionReceipt {
184184
tx_type: account_tx.tx_type(),
185185
reverted_steps,
186186
reverted_sierra_gas,
187-
proof_facts_length: 0,
187+
proof_facts_length: account_tx.proof_facts_length(),
188188
})
189189
}
190190
}

crates/blockifier/src/transaction/account_transaction.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ impl AccountTransaction {
220220
self.signature().0.len()
221221
}
222222

223+
pub fn proof_facts_length(&self) -> usize {
224+
if let Transaction::Invoke(tx) = &self.tx { tx.proof_facts_length() } else { 0 }
225+
}
226+
223227
pub fn enforce_fee(&self) -> bool {
224228
self.create_tx_info().enforce_fee()
225229
}

crates/starknet_api/src/executable_transaction.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,10 @@ impl InvokeTransaction {
345345
let tx_hash = invoke_tx.calculate_transaction_hash(chain_id, &invoke_tx.version())?;
346346
Ok(Self { tx: invoke_tx, tx_hash })
347347
}
348+
349+
pub fn proof_facts_length(&self) -> usize {
350+
self.proof_facts().0.len()
351+
}
348352
}
349353

350354
#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize, Hash)]

0 commit comments

Comments
 (0)