From 198133492185f019b2f79dc22ab751b568bf6146 Mon Sep 17 00:00:00 2001 From: Jose Coll Date: Fri, 13 Oct 2023 11:26:07 +0100 Subject: [PATCH] ENT-10110 Clean-up. (#7530) --- .../net/corda/core/flows/LedgerRecoverFlow.kt | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/core/src/main/kotlin/net/corda/core/flows/LedgerRecoverFlow.kt b/core/src/main/kotlin/net/corda/core/flows/LedgerRecoverFlow.kt index cf91603133..32c0ff3866 100644 --- a/core/src/main/kotlin/net/corda/core/flows/LedgerRecoverFlow.kt +++ b/core/src/main/kotlin/net/corda/core/flows/LedgerRecoverFlow.kt @@ -2,8 +2,6 @@ package net.corda.core.flows import co.paralleluniverse.fibers.Suspendable import net.corda.core.CordaInternal -import net.corda.core.crypto.SecureHash -import net.corda.core.identity.CordaX500Name import net.corda.core.identity.Party import net.corda.core.serialization.CordaSerializable import net.corda.core.utilities.ProgressTracker @@ -12,7 +10,6 @@ import net.corda.core.utilities.ProgressTracker * Ledger Recovery Flow (available in Enterprise only). */ @StartableByRPC -@InitiatingFlow class LedgerRecoveryFlow( private val parameters: LedgerRecoveryParameters, override val progressTracker: ProgressTracker = ProgressTracker()) : FlowLogic() { @@ -29,14 +26,6 @@ class LedgerRecoveryFlow( } } -@InitiatedBy(LedgerRecoveryFlow::class) -class ReceiveLedgerRecoveryFlow constructor(private val otherSideSession: FlowSession) : FlowLogic() { - @Suspendable - override fun call() { - throw NotImplementedError("Enterprise only feature") - } -} - @CordaSerializable class LedgerRecoveryException(message: String) : FlowException("Ledger recovery failed: $message") @@ -45,9 +34,7 @@ data class LedgerRecoveryParameters( val recoveryPeers: Collection, val timeWindow: RecoveryTimeWindow? = null, val useAllNetworkNodes: Boolean = false, - val transactionRole: TransactionRole = TransactionRole.ALL, val dryRun: Boolean = false, - val optimisticInitiatorRecovery: Boolean = false, val useTimeWindowNarrowing: Boolean = true, val verboseLogging: Boolean = true, val recoveryBatchSize: Int = 1000 @@ -59,25 +46,3 @@ data class LedgerRecoveryResult( val totalRecoveredTransactions: Long, val totalErrors: Long ) - -/** - * This specifies which type of transactions to recover based on the transaction role of the recovering node - */ -@CordaSerializable -enum class TransactionRole { - ALL, - INITIATOR, // only recover transactions that I initiated - PEER, // only recover transactions where I am a participant on a transaction - OBSERVER, // only recover transactions where I am an observer (but not participant) to a transaction - PEER_AND_OBSERVER // recovery transactions where I am either participant or observer -} - -@CordaSerializable -data class RecoveryResult( - val transactionId: SecureHash, - val recoveryPeer: CordaX500Name, - val transactionRole: TransactionRole, // what role did I play in this transaction - val synchronised: Boolean, // whether the transaction was successfully synchronised (will always be false when dryRun option specified) - val synchronisedInitiated: Boolean = false, // only attempted if [optimisticInitiatorRecovery] option set to true and [TransactionRecoveryType.INITIATOR] - val failureCause: String? = null // reason why a transaction failed to synchronise -)