mirror of
https://github.com/corda/corda.git
synced 2025-06-22 17:09:00 +00:00
Make Node override configuration and use FullNodeConfiguration so that no casting is needed
This commit is contained in:
@ -72,7 +72,7 @@ import kotlin.reflect.KClass
|
||||
// TODO: Where this node is the initial network map service, currently no networkMapService is provided.
|
||||
// In theory the NodeInfo for the node should be passed in, instead, however currently this is constructed by the
|
||||
// AbstractNode. It should be possible to generate the NodeInfo outside of AbstractNode, so it can be passed in.
|
||||
abstract class AbstractNode(val configuration: NodeConfiguration, val networkMapService: SingleMessageRecipient?,
|
||||
abstract class AbstractNode(open val configuration: NodeConfiguration, val networkMapService: SingleMessageRecipient?,
|
||||
val advertisedServices: Set<ServiceInfo>, val platformClock: Clock) : SingletonSerializeAsToken() {
|
||||
companion object {
|
||||
val PRIVATE_KEY_FILE_NAME = "identity-private-key"
|
||||
|
@ -9,7 +9,6 @@ import com.r3corda.core.utilities.loggerFor
|
||||
import com.r3corda.node.serialization.NodeClock
|
||||
import com.r3corda.node.services.api.MessagingServiceInternal
|
||||
import com.r3corda.node.services.config.FullNodeConfiguration
|
||||
import com.r3corda.node.services.config.NodeConfiguration
|
||||
import com.r3corda.node.services.messaging.ArtemisMessagingServer
|
||||
import com.r3corda.node.services.messaging.CordaRPCOps
|
||||
import com.r3corda.node.services.messaging.NodeMessagingClient
|
||||
@ -60,7 +59,7 @@ class ConfigurationException(message: String) : Exception(message)
|
||||
* @param messagingServerAddr The address of the Artemis broker instance. If not provided the node will run one locally.
|
||||
*/
|
||||
class Node(val p2pAddr: HostAndPort, val webServerAddr: HostAndPort,
|
||||
configuration: NodeConfiguration, networkMapAddress: SingleMessageRecipient?,
|
||||
override val configuration: FullNodeConfiguration, networkMapAddress: SingleMessageRecipient?,
|
||||
advertisedServices: Set<ServiceInfo>, clock: Clock = NodeClock(),
|
||||
val messagingServerAddr: HostAndPort? = null) : AbstractNode(configuration, networkMapAddress, advertisedServices, clock) {
|
||||
companion object {
|
||||
@ -163,7 +162,7 @@ class Node(val p2pAddr: HostAndPort, val webServerAddr: HostAndPort,
|
||||
|
||||
val server = Server()
|
||||
|
||||
if (configuration is FullNodeConfiguration && configuration.useHTTPS) {
|
||||
if (configuration.useHTTPS) {
|
||||
val httpsConfiguration = HttpConfiguration()
|
||||
httpsConfiguration.outputBufferSize = 32768
|
||||
httpsConfiguration.addCustomizer(SecureRequestCustomizer())
|
||||
|
@ -11,5 +11,6 @@ dataSourceProperties = {
|
||||
"dataSource.password" = ""
|
||||
}
|
||||
devMode = true
|
||||
hostNotaryServiceLocally = false
|
||||
certificateSigningService = "https://cordaci-netperm.corda.r3cev.com"
|
||||
useHTTPS = false
|
Reference in New Issue
Block a user