Split CashFlow into three flows

Split CashFlow into independent CashIssueFlow, CashExitFlow and CashPaymentFlow,
so that users can be given access to one but not the other(s).

Signed-off-by: Ross Nicoll <ross.nicoll@r3.com>
This commit is contained in:
Ross Nicoll
2017-01-30 18:34:48 +00:00
parent 47d260625a
commit 9055c9d9b0
25 changed files with 357 additions and 254 deletions

View File

@ -9,7 +9,7 @@ import net.corda.core.messaging.startFlow
import net.corda.core.node.services.ServiceInfo
import net.corda.core.node.services.Vault
import net.corda.core.serialization.OpaqueBytes
import net.corda.flows.CashCommand
import net.corda.core.toFuture
import net.corda.flows.CashFlow
import net.corda.node.driver.driver
import net.corda.node.services.User
@ -56,7 +56,7 @@ class IntegrationTestingTutorial {
val issueRef = OpaqueBytes.of(0)
for (i in 1 .. 10) {
thread {
aliceProxy.startFlow(::CashFlow, CashCommand.IssueCash(
aliceProxy.startFlow(::CashFlow, CashFlow.Command.IssueCash(
amount = i.DOLLARS,
issueRef = issueRef,
recipient = bob.nodeInfo.legalIdentity,
@ -82,7 +82,7 @@ class IntegrationTestingTutorial {
// START 5
for (i in 1 .. 10) {
val flowHandle = bobProxy.startFlow(::CashFlow, CashCommand.PayCash(
val flowHandle = bobProxy.startFlow(::CashFlow, CashFlow.Command.PayCash(
amount = i.DOLLARS.issuedBy(alice.nodeInfo.legalIdentity.ref(issueRef)),
recipient = alice.nodeInfo.legalIdentity
))
@ -102,4 +102,4 @@ class IntegrationTestingTutorial {
}
}
}
// END 5
// END 5