File tree Expand file tree Collapse file tree
hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/handle Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -368,7 +368,9 @@ private boolean handleEvents(
368368 final int receiptEntriesBatchSize ,
369369 @ NonNull final Consumer <ScopedSystemTransaction <StateSignatureTransaction >> stateSignatureTxnCallback ) {
370370 boolean transactionsDispatched = false ;
371- for (final var event : round ) {
371+ final var iter = round .iterator ();
372+ while (iter .hasNext ()) {
373+ final var event = iter .next ();
372374 if (streamMode != RECORDS ) {
373375 writeEventHeader (event );
374376 }
@@ -403,9 +405,8 @@ private boolean handleEvents(
403405 // Clear tx metadata now that we won't use it again
404406 platformTxn .setMetadata (null );
405407 }
406- if (!transactionsDispatched ) {
407- // If there were no platform transactions to follow with scheduled transactions, then
408- // use the round consensus time as the execution start time for scheduled transactions
408+ if (!transactionsDispatched && !iter .hasNext ()) {
409+ // If the entire round was empty, use the round consensus time as exec time for scheduled transactions
409410 transactionsDispatched = executeScheduledTransactions (state , round .getConsensusTimestamp (), creator );
410411 }
411412 recordCache .maybeCommitReceiptsBatch (
You can’t perform that action at this time.
0 commit comments