From 7cd7859a2be3504ffcd61bdc385abee78ac26114 Mon Sep 17 00:00:00 2001 From: libevm <95674753+libevm@users.noreply.github.com> Date: Tue, 15 Aug 2023 20:15:47 -0700 Subject: [PATCH] (fix)db commit on debug_traceCallMany (#4219) Co-authored-by: Ubuntu --- crates/rpc/rpc/src/debug.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index c3cba02e3e..147c2a9f35 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -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);