mirror of
https://github.com/corda/corda.git
synced 2025-06-17 14:48:16 +00:00
[CORDA-1089]: Correctly display an error message on node startup if RPC settings are invalid (#2592)
* [CORDA-1089]: Correctly produce an error message on node startup if rpc options are invalid. * [CORDA-1089]: Made RPC settings validation only trigger if address is specified. * [CORDA-1089]: Fixed outdated deployNodes task in build.gradle. * [CORDA-1089]: Fixed outdated deployNodes task in build.gradle.
This commit is contained in:
committed by
Katelyn Baker
parent
7358e902a5
commit
d97a579a2e
@ -164,15 +164,15 @@ data class NodeConfigurationImpl(
|
||||
|
||||
override fun validate(): List<String> {
|
||||
val errors = mutableListOf<String>()
|
||||
errors + validateRpcOptions(rpcOptions)
|
||||
errors += validateRpcOptions(rpcOptions)
|
||||
return errors
|
||||
}
|
||||
|
||||
private fun validateRpcOptions(options: NodeRpcOptions): List<String> {
|
||||
val errors = mutableListOf<String>()
|
||||
if (!options.useSsl) {
|
||||
if (options.adminAddress == null) {
|
||||
errors + "'rpcSettings.adminAddress': missing. Property is mandatory when 'rpcSettings.useSsl' is false (default)."
|
||||
if (options.address != null) {
|
||||
if (!options.useSsl && options.adminAddress == null) {
|
||||
errors += "'rpcSettings.adminAddress': missing. Property is mandatory when 'rpcSettings.useSsl' is false (default)."
|
||||
}
|
||||
}
|
||||
return errors
|
||||
|
Reference in New Issue
Block a user