mirror of
https://github.com/corda/corda.git
synced 2025-06-15 05:38:14 +00:00
Removed the network map service type as it's no longer needed.
The absence or presence of the networkMapService config is what determines if a node is the network map or not.
This commit is contained in:
@ -9,7 +9,6 @@ import net.corda.core.internal.read
|
||||
import net.corda.core.messaging.startFlow
|
||||
import net.corda.core.serialization.CordaSerializable
|
||||
import net.corda.node.services.FlowPermissions.Companion.startFlowPermission
|
||||
import net.corda.node.services.network.NetworkMapService
|
||||
import net.corda.node.services.transactions.ValidatingNotaryService
|
||||
import net.corda.nodeapi.User
|
||||
import net.corda.nodeapi.internal.ServiceInfo
|
||||
@ -297,7 +296,7 @@ class FlowStackSnapshotTest {
|
||||
val notaryNode = mockNet.createNode(
|
||||
legalName = DUMMY_NOTARY.name,
|
||||
overrideServices = mapOf(notaryService to DUMMY_NOTARY_KEY),
|
||||
advertisedServices = *arrayOf(ServiceInfo(NetworkMapService.type), notaryService))
|
||||
advertisedServices = *arrayOf(notaryService))
|
||||
val node = mockNet.createPartyNode(notaryNode.network.myAddress)
|
||||
node.internals.registerInitiatedFlow(DummyFlow::class.java)
|
||||
node.services.startFlow(FlowStackSnapshotSerializationTestingFlow()).resultFuture.get()
|
||||
|
@ -830,9 +830,7 @@ class DriverDSL(
|
||||
"rpcAddress" to rpcAddress.toString(),
|
||||
"rpcUsers" to defaultRpcUserList,
|
||||
"p2pAddress" to dedicatedNetworkMapAddress.toString(),
|
||||
"useTestClock" to useTestClock,
|
||||
"extraAdvertisedServiceIds" to listOf(ServiceInfo(NetworkMapService.type).toString())
|
||||
)
|
||||
"useTestClock" to useTestClock)
|
||||
)
|
||||
return startNodeInternal(config, webAddress, startInProcess, maximumHeapSize)
|
||||
}
|
||||
|
@ -400,7 +400,7 @@ class MockNetwork(private val networkSendManuallyPumped: Boolean = false,
|
||||
overrideServices: Map<ServiceInfo, KeyPair>? = null,
|
||||
serviceName: CordaX500Name? = null): StartedNode<MockNode> {
|
||||
return createNode(networkMapAddress, legalName = legalName, overrideServices = overrideServices,
|
||||
advertisedServices = *arrayOf(ServiceInfo(NetworkMapService.type), ServiceInfo(ValidatingNotaryService.type, serviceName)))
|
||||
advertisedServices = *arrayOf(ServiceInfo(ValidatingNotaryService.type, serviceName)))
|
||||
}
|
||||
|
||||
// Convenience method for Java
|
||||
|
@ -8,17 +8,16 @@ import net.corda.core.internal.div
|
||||
import net.corda.core.utilities.getOrThrow
|
||||
import net.corda.node.internal.Node
|
||||
import net.corda.node.internal.StartedNode
|
||||
import net.corda.nodeapi.internal.ServiceInfo
|
||||
import net.corda.nodeapi.internal.ServiceType
|
||||
import net.corda.node.services.config.ConfigHelper
|
||||
import net.corda.node.services.config.FullNodeConfiguration
|
||||
import net.corda.node.services.config.configOf
|
||||
import net.corda.node.services.config.plus
|
||||
import net.corda.node.services.network.NetworkMapService
|
||||
import net.corda.node.services.transactions.RaftValidatingNotaryService
|
||||
import net.corda.node.utilities.ServiceIdentityGenerator
|
||||
import net.corda.nodeapi.User
|
||||
import net.corda.nodeapi.config.parseAs
|
||||
import net.corda.nodeapi.internal.ServiceInfo
|
||||
import net.corda.nodeapi.internal.ServiceType
|
||||
import net.corda.testing.DUMMY_MAP
|
||||
import net.corda.testing.TestDependencyInjectionBase
|
||||
import net.corda.testing.driver.addressMustNotBeBoundFuture
|
||||
@ -91,7 +90,7 @@ abstract class NodeBasedTest : TestDependencyInjectionBase() {
|
||||
rpcUsers: List<User> = emptyList(),
|
||||
configOverrides: Map<String, Any> = emptyMap()): StartedNode<Node> {
|
||||
check(_networkMapNode == null || _networkMapNode!!.info.legalIdentitiesAndCerts.first().name == legalName)
|
||||
return startNodeInternal(legalName, platformVersion, advertisedServices + ServiceInfo(NetworkMapService.type), rpcUsers, configOverrides).apply {
|
||||
return startNodeInternal(legalName, platformVersion, advertisedServices, rpcUsers, configOverrides).apply {
|
||||
_networkMapNode = this
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user