Skip to content

Commit

Permalink
(fix)db commit on debug_traceCallMany (#4219)
Browse files Browse the repository at this point in the history
Co-authored-by: Ubuntu <user@ubuntu.com>
  • Loading branch information
libevm and Ubuntu authored Aug 16, 2023
1 parent 44874bc commit 7cd7859
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/rpc/rpc/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,9 @@ where
&mut db,
)?;

if bundles.peek().is_none() && transactions.peek().is_none() {
// If there is more transactions, commit the database
// If there is no transactions, but more bundles, commit to the database too
if transactions.peek().is_some() || bundles.peek().is_some() {
db.commit(state);
}
results.push(trace);
Expand Down

0 comments on commit 7cd7859

Please sign in to comment.