mirror of
https://github.com/corda/corda.git
synced 2025-06-24 02:04:12 +00:00
Removed the ability to manually start notary nodes from the driver and MockNetwork. Instead by default a single notary is automatically started. This can be customised at creation time of the driver and MockNetwork. This more accurately models the concept of network parameters in a CZ.
Also added helper methods to retrieve this default notary.
This commit is contained in:
@ -3,7 +3,9 @@ package net.corda.vega
|
||||
import com.opengamma.strata.product.common.BuySell
|
||||
import net.corda.core.identity.CordaX500Name
|
||||
import net.corda.core.utilities.getOrThrow
|
||||
import net.corda.testing.*
|
||||
import net.corda.testing.DUMMY_BANK_A
|
||||
import net.corda.testing.DUMMY_BANK_B
|
||||
import net.corda.testing.IntegrationTestCategory
|
||||
import net.corda.testing.driver.driver
|
||||
import net.corda.testing.http.HttpApi
|
||||
import net.corda.vega.api.PortfolioApi
|
||||
@ -27,7 +29,6 @@ class SimmValuationTest : IntegrationTestCategory {
|
||||
@Test
|
||||
fun `runs SIMM valuation demo`() {
|
||||
driver(isDebug = true, extraCordappPackagesToScan = listOf("net.corda.vega.contracts")) {
|
||||
startNotaryNode(DUMMY_NOTARY.name, validating = false).getOrThrow()
|
||||
val nodeAFuture = startNode(providedName = nodeALegalName)
|
||||
val nodeBFuture = startNode(providedName = nodeBLegalName)
|
||||
val (nodeA, nodeB) = listOf(nodeAFuture, nodeBFuture).map { it.getOrThrow() }
|
||||
|
@ -4,7 +4,6 @@ import net.corda.core.utilities.getOrThrow
|
||||
import net.corda.testing.DUMMY_BANK_A
|
||||
import net.corda.testing.DUMMY_BANK_B
|
||||
import net.corda.testing.DUMMY_BANK_C
|
||||
import net.corda.testing.DUMMY_NOTARY
|
||||
import net.corda.testing.driver.driver
|
||||
|
||||
/**
|
||||
@ -13,17 +12,17 @@ import net.corda.testing.driver.driver
|
||||
* via the web api.
|
||||
*/
|
||||
fun main(args: Array<String>) {
|
||||
driver(dsl = {
|
||||
val notaryFuture = startNotaryNode(DUMMY_NOTARY.name, validating = false)
|
||||
val nodeAFuture = startNode(providedName = DUMMY_BANK_A.name)
|
||||
val nodeBFuture = startNode(providedName = DUMMY_BANK_B.name)
|
||||
val nodeCFuture = startNode(providedName = DUMMY_BANK_C.name)
|
||||
val (nodeA, nodeB, nodeC) = listOf(nodeAFuture, nodeBFuture, nodeCFuture, notaryFuture).map { it.getOrThrow() }
|
||||
driver(isDebug = true) {
|
||||
val (nodeA, nodeB, nodeC) = listOf(
|
||||
startNode(providedName = DUMMY_BANK_A.name),
|
||||
startNode(providedName = DUMMY_BANK_B.name),
|
||||
startNode(providedName = DUMMY_BANK_C.name)
|
||||
).map { it.getOrThrow() }
|
||||
|
||||
startWebserver(nodeA)
|
||||
startWebserver(nodeB)
|
||||
startWebserver(nodeC)
|
||||
|
||||
waitForAllNodesToFinish()
|
||||
}, isDebug = true)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user