Skip to content

Commit

Permalink
More logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzejkop committed Feb 14, 2024
1 parent 3a2aad5 commit 29c90ed
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/tasks/escalate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,16 @@ async fn escalate_relayer_tx(
.signer_middleware(tx.chain_id, tx.key_id.clone())
.await?;

tracing::info!("Escalating transaction - got middleware");

let fees = app
.db
.get_latest_block_fees_by_chain_id(tx.chain_id)
.await?
.context("Missing block")?;

tracing::info!("Escalating transaction - got block fees");

// Min increase of 20% on the priority fee required for a replacement tx
let factor = U256::from(100);
let increased_gas_price_percentage =
Expand Down Expand Up @@ -123,10 +127,14 @@ async fn escalate_relayer_tx(
chain_id: Some(tx.chain_id.into()),
};

tracing::info!("Escalating transaction - assembled tx");

let pending_tx = middleware
.send_transaction(TypedTransaction::Eip1559(eip1559_tx), None)
.await;

tracing::info!("Escalating transaction - sent tx");

let pending_tx = match pending_tx {
Ok(pending_tx) => pending_tx,
Err(err) => {
Expand All @@ -135,6 +143,8 @@ async fn escalate_relayer_tx(
}
};

tracing::info!("Escalating transaction - got pending tx");

let tx_hash = pending_tx.tx_hash();

tracing::info!(
Expand Down

0 comments on commit 29c90ed

Please sign in to comment.