mirror of
https://github.com/corda/corda.git
synced 2025-02-07 11:30:22 +00:00
Rename debugOptions to devModeOptions, extension method
This commit is contained in:
parent
0cbee046f9
commit
d275ab41a8
@ -28,7 +28,7 @@ interface NodeConfiguration : NodeSSLConfiguration {
|
|||||||
val database: Properties?
|
val database: Properties?
|
||||||
val rpcUsers: List<User>
|
val rpcUsers: List<User>
|
||||||
val devMode: Boolean
|
val devMode: Boolean
|
||||||
val debugOptions: Properties?
|
val devModeOptions: Properties?
|
||||||
val certificateSigningService: URL
|
val certificateSigningService: URL
|
||||||
val certificateChainCheckPolicies: List<CertChainPolicyConfig>
|
val certificateChainCheckPolicies: List<CertChainPolicyConfig>
|
||||||
val verifierType: VerifierType
|
val verifierType: VerifierType
|
||||||
@ -38,6 +38,10 @@ interface NodeConfiguration : NodeSSLConfiguration {
|
|||||||
val additionalNodeInfoPollingFrequencyMsec: Long
|
val additionalNodeInfoPollingFrequencyMsec: Long
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun NodeConfiguration.isDevModeOptionsFlagSet(flag: String):Boolean{
|
||||||
|
return this.devModeOptions?.get(flag).toString().toLowerCase() == "true"
|
||||||
|
}
|
||||||
|
|
||||||
data class NotaryConfig(val validating: Boolean,
|
data class NotaryConfig(val validating: Boolean,
|
||||||
val raft: RaftConfig? = null,
|
val raft: RaftConfig? = null,
|
||||||
val bftSMaRt: BFTSMaRtConfiguration? = null,
|
val bftSMaRt: BFTSMaRtConfiguration? = null,
|
||||||
@ -94,7 +98,7 @@ data class FullNodeConfiguration(
|
|||||||
override val notary: NotaryConfig?,
|
override val notary: NotaryConfig?,
|
||||||
override val certificateChainCheckPolicies: List<CertChainPolicyConfig>,
|
override val certificateChainCheckPolicies: List<CertChainPolicyConfig>,
|
||||||
override val devMode: Boolean = false,
|
override val devMode: Boolean = false,
|
||||||
override val debugOptions: Properties? = null,
|
override val devModeOptions: Properties? = null,
|
||||||
val useTestClock: Boolean = false,
|
val useTestClock: Boolean = false,
|
||||||
val detectPublicIp: Boolean = true,
|
val detectPublicIp: Boolean = true,
|
||||||
override val activeMQServer: ActiveMqServerConfiguration,
|
override val activeMQServer: ActiveMqServerConfiguration,
|
||||||
@ -105,7 +109,7 @@ data class FullNodeConfiguration(
|
|||||||
init {
|
init {
|
||||||
// This is a sanity feature do not remove.
|
// This is a sanity feature do not remove.
|
||||||
require(!useTestClock || devMode) { "Cannot use test clock outside of dev mode" }
|
require(!useTestClock || devMode) { "Cannot use test clock outside of dev mode" }
|
||||||
require(debugOptions == null || devMode){"Cannot use debugOptions outside of dev mode"}
|
require(devModeOptions == null || devMode){ "Cannot use devModeOptions outside of dev mode" }
|
||||||
// TODO Move this to ArtemisMessagingServer
|
// TODO Move this to ArtemisMessagingServer
|
||||||
rpcUsers.forEach {
|
rpcUsers.forEach {
|
||||||
require(it.username.matches("\\w+".toRegex())) { "Username ${it.username} contains invalid characters" }
|
require(it.username.matches("\\w+".toRegex())) { "Username ${it.username} contains invalid characters" }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user