Skip to content

Commit 54b1163

Browse files
apollo_mempool: move instrument from handle_fee_escalation to validate_tx (#10571)
1 parent c5dc36d commit 54b1163

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

crates/apollo_mempool/src/mempool.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,18 @@ impl Mempool {
337337
}
338338

339339
/// Perform validation-only of an incoming transaction (without changing the state).
340+
#[instrument(
341+
level = "debug",
342+
skip(self, args),
343+
fields( // Log subset of (informative) fields.
344+
tx_nonce = %args.tx_nonce,
345+
tx_hash = %args.tx_hash,
346+
tx_tip = %args.tip,
347+
tx_max_l2_gas_price = %args.max_l2_gas_price,
348+
address = %args.address
349+
),
350+
err)
351+
]
340352
pub fn validate_tx(&mut self, args: ValidationArgs) -> MempoolResult<()> {
341353
let tx_reference = (&args).into();
342354
self.validate_incoming_tx(tx_reference, args.account_nonce)?;
@@ -602,7 +614,6 @@ impl Mempool {
602614
/// actually removing the existing transaction. If `false`, removes the existing transaction
603615
/// when replacement is valid.
604616
/// Note: This method will **not** add the new incoming transaction.
605-
#[instrument(level = "debug", skip(self), err)]
606617
fn handle_fee_escalation(
607618
&mut self,
608619
incoming_tx_reference: TransactionReference,

0 commit comments

Comments
 (0)