diff --git a/src/herder/TxSetFrame.cpp b/src/herder/TxSetFrame.cpp index 59187b8803..452d0dec1a 100644 --- a/src/herder/TxSetFrame.cpp +++ b/src/herder/TxSetFrame.cpp @@ -868,12 +868,18 @@ TxSetXDRFrame::makeEmpty(LedgerHeaderHistoryEntry const& lclHeader) if (protocolVersionStartsFrom(lclHeader.header.ledgerVersion, SOROBAN_PROTOCOL_VERSION)) { - // Create only non-parallel phases for now. Later we'll need to add an - // empty Soroban parallel stage starting from the respective protocol - // version. std::vector emptyPhases( static_cast(TxSetPhase::PHASE_COUNT), TxSetPhaseFrame::makeEmpty(false)); +#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION + if (protocolVersionStartsFrom(lclHeader.header.ledgerVersion, + PARALLEL_SOROBAN_PHASE_PROTOCOL_VERSION)) + { + emptyPhases[static_cast(TxSetPhase::SOROBAN)] = + TxSetPhaseFrame::makeEmpty(true); + } +#endif + GeneralizedTransactionSet txSet; transactionsToGeneralizedTransactionSetXDR(emptyPhases, lclHeader.hash, txSet); diff --git a/src/herder/TxSetFrame.h b/src/herder/TxSetFrame.h index 7a915bdf38..cf0e980684 100644 --- a/src/herder/TxSetFrame.h +++ b/src/herder/TxSetFrame.h @@ -56,7 +56,7 @@ makeTxSetFromTransactions( #ifdef BUILD_TESTS // Skips the tx set validation and preserves the pointers // to the passed-in transactions - use in conjunction with - // `orderOverride` argument in test-only overrides. + // `enforceTxsApplyOrder` argument in test-only overrides. , bool skipValidation = false #endif @@ -69,7 +69,7 @@ makeTxSetFromTransactions( #ifdef BUILD_TESTS // Skips the tx set validation and preserves the pointers // to the passed-in transactions - use in conjunction with - // `orderOverride` argument in test-only overrides. + // `enforceTxsApplyOrder` argument in test-only overrides. , bool skipValidation = false #endif diff --git a/src/herder/test/TestTxSetUtils.cpp b/src/herder/test/TestTxSetUtils.cpp index 0b89267c09..2f3eb41698 100644 --- a/src/herder/test/TestTxSetUtils.cpp +++ b/src/herder/test/TestTxSetUtils.cpp @@ -41,12 +41,14 @@ makeGeneralizedTxSetXDR(std::vector const& phases, releaseAssert(i < static_cast(TxSetPhase::PHASE_COUNT)); auto const& phase = phases[i]; bool isParallelSorobanPhase = false; +#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION if (useParallelSorobanPhase && i == static_cast(TxSetPhase::SOROBAN)) { releaseAssert(phase.size() <= 1); isParallelSorobanPhase = true; } +#endif auto normalizedTxsPerBaseFee = phase; std::sort(normalizedTxsPerBaseFee.begin(), @@ -66,6 +68,7 @@ makeGeneralizedTxSetXDR(std::vector const& phases, { if (isParallelSorobanPhase) { +#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION auto& component = xdrPhase.parallelTxsComponent(); if (baseFee) { @@ -81,6 +84,9 @@ makeGeneralizedTxSetXDR(std::vector const& phases, cluster.emplace_back(tx->getEnvelope()); } } +#else + releaseAssert(false); +#endif } else {