Skip to content

Commit 02929e9

Browse files
authored
chore(dal): Change sync mempool log level (#4446)
## What ❔ <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- The `Why` has to be clear to non-Matter Labs entities running their own ZK Chain --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Is this a breaking change? - [ ] Yes - [ ] No ## Operational changes <!-- Any config changes? Any new flags? Any changes to any scripts? --> <!-- Please add anything that non-Matter Labs entities running their own ZK Chain may need to know --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`. Signed-off-by: Danil <[email protected]>
1 parent daa1161 commit 02929e9

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

core/lib/dal/src/transactions_dal.rs

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1828,12 +1828,14 @@ impl TransactionsDal<'_, '_> {
18281828
.execute(self.storage)
18291829
.await?;
18301830

1831-
tracing::debug!(
1832-
"Updated {} transactions for stashed accounts, stashed accounts amount: {}, stashed_accounts: {:?}",
1833-
result.rows_affected(),
1834-
stashed_addresses.len(),
1835-
stashed_accounts.iter().map(|a|format!("{:x}", a)).collect::<Vec<_>>()
1836-
);
1831+
if result.rows_affected() > 0 {
1832+
tracing::trace!(
1833+
"Updated {} transactions for stashed accounts, stashed accounts amount: {}, stashed_accounts: {:?}",
1834+
result.rows_affected(),
1835+
stashed_addresses.len(),
1836+
stashed_accounts.iter().map(|a|format!("{:x}", a)).collect::<Vec<_>>()
1837+
);
1838+
}
18371839

18381840
let purged_addresses: Vec<_> = purged_accounts.iter().map(Address::as_bytes).collect();
18391841
let result = sqlx::query!(
@@ -1849,12 +1851,13 @@ impl TransactionsDal<'_, '_> {
18491851
.with_arg("purged_addresses.len", &purged_addresses.len())
18501852
.execute(self.storage)
18511853
.await?;
1852-
1853-
tracing::debug!(
1854-
"Updated {} transactions for purged accounts, purged accounts amount: {}",
1855-
result.rows_affected(),
1856-
purged_addresses.len()
1857-
);
1854+
if result.rows_affected() > 0 {
1855+
tracing::trace!(
1856+
"Updated {} transactions for purged accounts, purged accounts amount: {}",
1857+
result.rows_affected(),
1858+
purged_addresses.len()
1859+
);
1860+
}
18581861

18591862
// Note, that transactions are updated in order of their hashes to avoid deadlocks with other UPDATE queries.
18601863
let transactions = sqlx::query_as!(

0 commit comments

Comments
 (0)