Skip to content

Commit

Permalink
consistent txn in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldjeffrey committed Dec 3, 2024
1 parent 43d70fd commit 3f285f8
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions mobile_packet_verifier/src/burner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ where
match self.solana.submit_transaction(&txn).await {
Err(err) => {
let span = tracing::info_span!(
"transaction_confirmation",
"txn_confirmation",
signature = %txn.get_signature(),
%payer,
total_dcs,
Expand All @@ -72,8 +72,6 @@ where
)
.instrument(span),
);

continue;
}
Ok(()) => {
handle_transaction_success(
Expand Down Expand Up @@ -108,7 +106,7 @@ where

async move {
tracing::warn!(?err, "starting txn confirmation check");
// We don't know if the transaction actually made it, maybe it did
// We don't know if the txn actually made it, maybe it did

let signature = txn.get_signature();
for check_idx in 0..retry_attempts {
Expand All @@ -131,18 +129,18 @@ where
return;
}
Ok(false) => {
// we did bad, maybe check again?
tracing::info!(check_idx, "transaction not confirmed, yet...");
tracing::info!(check_idx, "txn not confirmed, yet...");
continue;
}
Err(err) => {
// could not check, maybe check again?
tracing::error!(?err, check_idx, "failed to confirm transaction");
tracing::error!(?err, check_idx, "failed to confirm txn");
continue;
}
}
}

tracing::warn!("failed to confirm txn");

// We have failed to burn data credits:
metrics::counter!(
"burned",
Expand Down

0 comments on commit 3f285f8

Please sign in to comment.