mirror of
https://github.com/corda/corda.git
synced 2025-06-15 21:58:17 +00:00
CORDA-535: Move implementation specific configuration values out of n… (#4058)
The configuration objects for specific notary implementations have been replaced by a single untyped "extraConfig" Config object that is left to the notary service itself to parse. * Remove the raft bootstrapping command from node, we'll need a different mechanism for that. * Remove pre-generated identity config value. * Split up obtainIdentity() in AbstractNode to make it easier to read. * A temporary workaround for the bootstrapper tool to support BFT notaries. * Update docs * Add upgrade notes * Fix rebase issue * Add a config diff for the bft notary as well
This commit is contained in:
@ -126,8 +126,8 @@ internal constructor(private val initSerEnv: Boolean,
|
||||
}
|
||||
return clusteredNotaries.groupBy { it.first }.map { (k, vs) ->
|
||||
val cs = vs.map { it.second.config }
|
||||
if (cs.any { it.hasPath("notary.bftSMaRt") }) {
|
||||
require(cs.all { it.hasPath("notary.bftSMaRt") }) { "Mix of BFT and non-BFT notaries with service name $k" }
|
||||
if (cs.any { isBFTNotary(it) }) {
|
||||
require(cs.all { isBFTNotary(it) }) { "Mix of BFT and non-BFT notaries with service name $k" }
|
||||
NotaryCluster.BFT(k) to vs.map { it.second.directory }
|
||||
} else {
|
||||
NotaryCluster.CFT(k) to vs.map { it.second.directory }
|
||||
@ -135,6 +135,12 @@ internal constructor(private val initSerEnv: Boolean,
|
||||
}.toMap()
|
||||
}
|
||||
|
||||
private fun isBFTNotary(config: Config): Boolean {
|
||||
// TODO: pass a commandline parameter to the bootstrapper instead. Better yet, a notary config map
|
||||
// specifying the notary identities and the type (single-node, CFT, BFT) of each notary to set up.
|
||||
return config.getString ("notary.className").contains("BFT", true)
|
||||
}
|
||||
|
||||
private fun generateServiceIdentitiesForNotaryClusters(configs: Map<Path, Config>) {
|
||||
notaryClusters(configs).forEach { (cluster, directories) ->
|
||||
when (cluster) {
|
||||
|
Reference in New Issue
Block a user