Trader demo IntelliJ configurations and driver updated to work with the new RPC style demo.

This commit is contained in:
Clinton Alexander
2017-01-17 12:01:35 +00:00
parent f512bd2e71
commit e6da4909d3
3 changed files with 13 additions and 7 deletions

View File

@ -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)