From 37627ae256ac871547f5bdcd029e58cb7b530139 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Tue, 19 Feb 2019 19:42:32 +0100 Subject: [PATCH] Bugfix: register SwapIdentitiesHandler again. (#4789) --- client/rpc/build.gradle | 4 ---- node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt | 2 ++ .../kotlin/net/corda/node/internal/SwapIdentitiesHandler.kt | 2 +- samples/irs-demo/cordapp/build.gradle | 4 +--- samples/simm-valuation-demo/build.gradle | 2 -- samples/trader-demo/workflows-trader/build.gradle | 1 - 6 files changed, 4 insertions(+), 11 deletions(-) diff --git a/client/rpc/build.gradle b/client/rpc/build.gradle index c30049ee08..5d0eb0a662 100644 --- a/client/rpc/build.gradle +++ b/client/rpc/build.gradle @@ -62,9 +62,6 @@ processSmokeTestResources { from(project(':finance:contracts').tasks['jar']) { rename '.*finance-contracts-.*', 'cordapp-finance-contracts.jar' } - from(project(':confidential-identities').tasks['jar']) { - rename '.*confidential-identities-.*', 'cordapp-confidential-identities.jar' - } } // To find potential version conflicts, run "gradle htmlDependencyReport" and then look in @@ -90,7 +87,6 @@ dependencies { smokeTestCompile project(':smoke-test-utils') smokeTestCompile project(':finance:contracts') smokeTestCompile project(':finance:workflows') - smokeTestCompile project(':confidential-identities') smokeTestCompile "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version" smokeTestCompile "org.apache.logging.log4j:log4j-core:$log4j_version" smokeTestCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" diff --git a/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt b/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt index b1e428e69f..27345da35f 100644 --- a/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt +++ b/node/src/main/kotlin/net/corda/node/internal/AbstractNode.kt @@ -4,6 +4,7 @@ import com.codahale.metrics.MetricRegistry import com.google.common.collect.MutableClassToInstanceMap import com.google.common.util.concurrent.MoreExecutors import com.zaxxer.hikari.pool.HikariPool +import net.corda.confidential.SwapIdentitiesFlow import net.corda.core.CordaException import net.corda.core.concurrent.CordaFuture import net.corda.core.context.InvocationContext @@ -684,6 +685,7 @@ abstract class AbstractNode(val configuration: NodeConfiguration, installFinalityHandler() flowManager.registerInitiatedCoreFlowFactory(NotaryChangeFlow::class, NotaryChangeHandler::class, ::NotaryChangeHandler) flowManager.registerInitiatedCoreFlowFactory(ContractUpgradeFlow.Initiate::class, NotaryChangeHandler::class, ::ContractUpgradeHandler) + flowManager.registerInitiatedCoreFlowFactory(SwapIdentitiesFlow::class, SwapIdentitiesHandler::class, ::SwapIdentitiesHandler) } // Ideally we should be disabling the FinalityHandler if it's not needed, to prevent any party from submitting transactions to us without diff --git a/node/src/main/kotlin/net/corda/node/internal/SwapIdentitiesHandler.kt b/node/src/main/kotlin/net/corda/node/internal/SwapIdentitiesHandler.kt index f1c8aff9f3..3b6b08b307 100644 --- a/node/src/main/kotlin/net/corda/node/internal/SwapIdentitiesHandler.kt +++ b/node/src/main/kotlin/net/corda/node/internal/SwapIdentitiesHandler.kt @@ -12,7 +12,7 @@ import net.corda.core.internal.warnOnce * but it is a complex versioning problem because we don't know which peers we might interact with. Disabling it will probably have to be * gated on a minPlatformVersion bump. */ -@InitiatedBy(SwapIdentitiesFlow::class) +//@InitiatedBy(SwapIdentitiesFlow::class) class SwapIdentitiesHandler(private val otherSide: FlowSession) : FlowLogic() { @Suspendable override fun call() { diff --git a/samples/irs-demo/cordapp/build.gradle b/samples/irs-demo/cordapp/build.gradle index 2891083335..3ffb92b4b4 100644 --- a/samples/irs-demo/cordapp/build.gradle +++ b/samples/irs-demo/cordapp/build.gradle @@ -20,7 +20,7 @@ sourceSets { dependencies { cordapp project(':finance:contracts') cordapp project(':finance:workflows') - cordapp project(':confidential-identities') + // Corda integration dependencies cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts') cordaCompile project(':core') @@ -52,7 +52,6 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask]) } cordapp project(':samples:irs-demo:cordapp:contracts-irs') cordapp project(':samples:irs-demo:cordapp:workflows-irs') - cordapp project(':confidential-identities') } node { name "O=Notary Service,L=Zurich,C=CH" @@ -111,7 +110,6 @@ task prepareDockerNodes(type: net.corda.plugins.Dockerform, dependsOn: ['jar', n nodeDefaults{ cordapp project(':samples:irs-demo:cordapp:contracts-irs') cordapp project(':samples:irs-demo:cordapp:workflows-irs') - cordapp project(':confidential-identities') } node { name "O=Notary Service,L=Zurich,C=CH" diff --git a/samples/simm-valuation-demo/build.gradle b/samples/simm-valuation-demo/build.gradle index a9708fdebd..b7db45d7aa 100644 --- a/samples/simm-valuation-demo/build.gradle +++ b/samples/simm-valuation-demo/build.gradle @@ -33,7 +33,6 @@ dependencies { cordapp project(':finance:workflows') cordapp project(path: ':samples:simm-valuation-demo:contracts-states', configuration: 'shrinkArtifacts') cordapp project(':samples:simm-valuation-demo:flows') - cordapp project(':confidential-identities') // Corda integration dependencies cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts') @@ -72,7 +71,6 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask, cordapp project(':finance:workflows') cordapp project(':samples:simm-valuation-demo:contracts-states') cordapp project(':samples:simm-valuation-demo:flows') - cordapp project(':confidential-identities') rpcUsers = [['username': "default", 'password': "default", 'permissions': [ 'ALL' ]]] } node { diff --git a/samples/trader-demo/workflows-trader/build.gradle b/samples/trader-demo/workflows-trader/build.gradle index 614a817ea1..05f6cf8178 100644 --- a/samples/trader-demo/workflows-trader/build.gradle +++ b/samples/trader-demo/workflows-trader/build.gradle @@ -24,7 +24,6 @@ dependencies { // The trader demo CorDapp depends upon Cash CorDapp features cordapp project(':finance:contracts') cordapp project(':finance:workflows') - cordapp project(':confidential-identities') cordapp project(':samples:bank-of-corda-demo') // Corda integration dependencies