File tree 2 files changed +5
-3
lines changed
hedera-node/hedera-app/src
main/java/com/hedera/node/app/workflows/handle
test/java/com/hedera/node/app/workflows/handle
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -589,8 +589,8 @@ public <T> T doDispatchPrecedingTransaction(
589
589
requireNonNull (txBody , "txBody must not be null" );
590
590
requireNonNull (recordBuilderClass , "recordBuilderClass must not be null" );
591
591
592
- if (category != TransactionCategory . USER && category != TransactionCategory . CHILD ) {
593
- throw new IllegalArgumentException ("Only user- or child-transactions can dispatch preceding transactions" );
592
+ if (category == PRECEDING ) {
593
+ throw new IllegalArgumentException ("A preceding transaction cannot dispatch preceding transactions" );
594
594
}
595
595
596
596
final var precedingRecordBuilder = recordBuilderFactory .get ();
Original file line number Diff line number Diff line change @@ -1182,7 +1182,9 @@ void testDispatchHandleFails(final Consumer<HandleContext> contextDispatcher) th
1182
1182
@ ParameterizedTest
1183
1183
@ EnumSource (TransactionCategory .class )
1184
1184
void testDispatchPrecedingWithNonUserTxnFails (final TransactionCategory category ) {
1185
- if (category != TransactionCategory .USER && category != TransactionCategory .CHILD ) {
1185
+ if (category != TransactionCategory .USER
1186
+ && category != TransactionCategory .CHILD
1187
+ && category != TransactionCategory .SCHEDULED ) {
1186
1188
// given
1187
1189
final var context = createContext (defaultTransactionBody (), category );
1188
1190
You can’t perform that action at this time.
0 commit comments