mirror of
https://github.com/corda/corda.git
synced 2025-06-14 21:28:14 +00:00
Change CashIssueFlow to always issue to ourselves
Change CashIssueFlow to always issue to ourselves, and require the cash is then moved in a separate payment operation. This more closely models actual operation inside banks, and is a step towards making all move-like operations go through a uniform verification process.
This commit is contained in:
@ -128,7 +128,7 @@ fun generateTransactions(proxy: CordaRPCOps) {
|
||||
proxy.startFlow(::CashPaymentFlow, Amount(quantity, USD), me)
|
||||
} else {
|
||||
val quantity = Math.abs(random.nextLong() % 1000)
|
||||
proxy.startFlow(::CashIssueFlow, Amount(quantity, USD), me, me, issueRef, notary, true)
|
||||
proxy.startFlow(::CashIssueFlow, Amount(quantity, USD), issueRef, notary)
|
||||
ownedQuantity += quantity
|
||||
}
|
||||
}
|
||||
|
@ -133,8 +133,7 @@ object TopupIssuerFlow {
|
||||
// invoke Cash subflow to issue Asset
|
||||
progressTracker.currentStep = ISSUING
|
||||
val issuer = serviceHub.myInfo.legalIdentity
|
||||
val issueRecipient = serviceHub.myInfo.legalIdentity
|
||||
val issueCashFlow = CashIssueFlow(amount, issueRecipient, issuer, issuerPartyRef, notaryParty, anonymous = false)
|
||||
val issueCashFlow = CashIssueFlow(amount, issuerPartyRef, notaryParty)
|
||||
val issueTx = subFlow(issueCashFlow)
|
||||
// NOTE: issueCashFlow performs a Broadcast (which stores a local copy of the txn to the ledger)
|
||||
// short-circuit when issuing to self
|
||||
|
Reference in New Issue
Block a user