Skip to content

Commit

Permalink
Add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
perekopskiy committed Feb 14, 2024
1 parent ad97079 commit 13dd85c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/lib/dal/src/transactions_dal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ impl TransactionsDal<'_, '_> {
.is_some();

if is_duplicate {
tracing::debug!("Prevented inserting duplicate L2 transaction {tx_hash:?} to DB");
return L2TxSubmissionResult::Duplicate;
}

Expand Down Expand Up @@ -432,6 +433,7 @@ impl TransactionsDal<'_, '_> {
if let error::Error::Database(ref error) = err {
if let Some(constraint) = error.constraint() {
if constraint == "transactions_pkey" {
tracing::debug!("Attempted to insert duplicate L2 transaction {tx_hash:?} to DB");
return L2TxSubmissionResult::Duplicate;
}
}
Expand Down

0 comments on commit 13dd85c

Please sign in to comment.