De-issuerify the cash payment flow. This makes it easier to use the payment flow from the shell.

This commit is contained in:
Mike Hearn
2017-03-15 18:12:28 +01:00
parent 4f6b44ceff
commit afbc8f9b5c
15 changed files with 43 additions and 72 deletions

View File

@ -122,7 +122,7 @@ fun generateTransactions(proxy: CordaRPCOps) {
ownedQuantity -= quantity
} else if (ownedQuantity > 1000 && n < 0.7) {
val quantity = Math.abs(random.nextLong() % Math.min(ownedQuantity, 2000))
proxy.startFlow(::CashPaymentFlow, Amount(quantity, Issued(meAndRef, USD)), me)
proxy.startFlow(::CashPaymentFlow, Amount(quantity, USD), me)
} else {
val quantity = Math.abs(random.nextLong() % 1000)
proxy.startFlow(::CashIssueFlow, Amount(quantity, USD), issueRef, me, notary)