mirror of
https://github.com/corda/corda.git
synced 2025-06-19 07:38:22 +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:
@ -65,11 +65,8 @@ class CustomVaultQueryTest {
|
||||
private fun issueCashForCurrency(amountToIssue: Amount<Currency>) {
|
||||
// Use NodeA as issuer and create some dollars
|
||||
val flowHandle1 = nodeA.services.startFlow(CashIssueFlow(amountToIssue,
|
||||
nodeA.info.legalIdentity,
|
||||
nodeA.info.legalIdentity,
|
||||
OpaqueBytes.of(0x01),
|
||||
notaryNode.info.notaryIdentity,
|
||||
anonymous = false))
|
||||
notaryNode.info.notaryIdentity))
|
||||
// Wait for the flow to stop and print
|
||||
flowHandle1.resultFuture.getOrThrow()
|
||||
}
|
||||
|
@ -45,22 +45,16 @@ class FxTransactionBuildTutorialTest {
|
||||
fun `Run ForeignExchangeFlow to completion`() {
|
||||
// Use NodeA as issuer and create some dollars
|
||||
val flowHandle1 = nodeA.services.startFlow(CashIssueFlow(DOLLARS(1000),
|
||||
nodeA.info.legalIdentity,
|
||||
nodeA.info.legalIdentity,
|
||||
OpaqueBytes.of(0x01),
|
||||
notaryNode.info.notaryIdentity,
|
||||
false))
|
||||
notaryNode.info.notaryIdentity))
|
||||
// Wait for the flow to stop and print
|
||||
flowHandle1.resultFuture.getOrThrow()
|
||||
printBalances()
|
||||
|
||||
// Using NodeB as Issuer create some pounds.
|
||||
val flowHandle2 = nodeB.services.startFlow(CashIssueFlow(POUNDS(1000),
|
||||
nodeB.info.legalIdentity,
|
||||
nodeB.info.legalIdentity,
|
||||
OpaqueBytes.of(0x01),
|
||||
notaryNode.info.notaryIdentity,
|
||||
false))
|
||||
notaryNode.info.notaryIdentity))
|
||||
// Wait for flow to come to an end and print
|
||||
flowHandle2.resultFuture.getOrThrow()
|
||||
printBalances()
|
||||
|
Reference in New Issue
Block a user