(fix)db commit on debug_traceCallMany (#4219)

Co-authored-by: Ubuntu <user@ubuntu.com>
This commit is contained in:
libevm
2023-08-15 20:15:47 -07:00
committed by GitHub
parent 44874bc557
commit 7cd7859a2b

View File

@@ -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);