mirror of
https://github.com/corda/corda.git
synced 2025-06-12 20:28:18 +00:00
Trader demo IntelliJ configurations and driver updated to work with the new RPC style demo.
This commit is contained in:
@ -7,17 +7,23 @@ import net.corda.node.services.User
|
||||
import net.corda.node.services.startFlowPermission
|
||||
import net.corda.node.services.transactions.SimpleNotaryService
|
||||
import net.corda.testing.BOC
|
||||
import java.nio.file.Paths
|
||||
import net.corda.core.div
|
||||
|
||||
/**
|
||||
* This file is exclusively for being able to run your nodes through an IDE (as opposed to running deployNodes)
|
||||
* Do not use in a production environment.
|
||||
*/
|
||||
fun main(args: Array<String>) {
|
||||
driver(dsl = {
|
||||
val permissions = setOf(
|
||||
startFlowPermission<IssuerFlow.IssuanceRequester>(),
|
||||
startFlowPermission<net.corda.traderdemo.flow.SellerFlow>())
|
||||
val demoUser = listOf(User("demo", "demo", permissions))
|
||||
driver(driverDirectory = Paths.get("build") / "trader-demo-nodes", dsl = {
|
||||
val user = User("user1", "test", permissions = setOf(startFlowPermission<IssuerFlow.IssuanceRequester>()))
|
||||
startNode("Notary", setOf(ServiceInfo(SimpleNotaryService.type)))
|
||||
startNode("Bank A")
|
||||
startNode("Bank B")
|
||||
startNode("Bank A", rpcUsers = demoUser)
|
||||
startNode("Bank B", rpcUsers = demoUser)
|
||||
startNode(BOC.name, rpcUsers = listOf(user))
|
||||
waitForAllNodesToFinish()
|
||||
}, isDebug = true)
|
||||
|
Reference in New Issue
Block a user