From 18d00d9e4205457077bfcd352f4451b1ad7a12bd Mon Sep 17 00:00:00 2001 From: Anthony Keenan Date: Wed, 23 Jan 2019 09:44:52 +0000 Subject: [PATCH] CORDA-2482 - Fix issue with devModeOptions.allowCompatabilityZone not working (#4613) (#4616) --- node/src/main/kotlin/net/corda/node/NodeCmdLineOptions.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/node/src/main/kotlin/net/corda/node/NodeCmdLineOptions.kt b/node/src/main/kotlin/net/corda/node/NodeCmdLineOptions.kt index c4e3d64813..019d5f4b24 100644 --- a/node/src/main/kotlin/net/corda/node/NodeCmdLineOptions.kt +++ b/node/src/main/kotlin/net/corda/node/NodeCmdLineOptions.kt @@ -93,7 +93,7 @@ open class SharedNodeCmdLineOptions { class InitialRegistrationCmdLineOptions : SharedNodeCmdLineOptions() { override fun parseConfiguration(configuration: Config): Valid { return super.parseConfiguration(configuration).doIfValid { config -> - require(!config.devMode) { "Registration cannot occur in development mode" } + require(!config.devMode || config.devModeOptions?.allowCompatibilityZone == true) require(config.compatibilityZoneURL != null || config.networkServices != null) { "compatibilityZoneURL or networkServices must be present in the node configuration file in registration mode." } @@ -165,7 +165,6 @@ open class NodeCmdLineOptions : SharedNodeCmdLineOptions() { override fun parseConfiguration(configuration: Config): Valid { return super.parseConfiguration(configuration).doIfValid { config -> if (isRegistration) { - require(!config.devMode) { "Registration cannot occur in development mode" } require(config.compatibilityZoneURL != null || config.networkServices != null) { "compatibilityZoneURL or networkServices must be present in the node configuration file in registration mode." }