mirror of
https://github.com/corda/corda.git
synced 2025-06-18 07:08:15 +00:00
De-issuerify the cash payment flow. This makes it easier to use the payment flow from the shell.
This commit is contained in:
@ -144,9 +144,7 @@ class DistributedServiceTests : DriverBasedTest() {
|
||||
}
|
||||
|
||||
private fun paySelf(amount: Amount<Currency>) {
|
||||
val payHandle = aliceProxy.startFlow(
|
||||
::CashPaymentFlow,
|
||||
amount.issuedBy(alice.nodeInfo.legalIdentity.ref(0)), alice.nodeInfo.legalIdentity)
|
||||
val payHandle = aliceProxy.startFlow(::CashPaymentFlow, amount, alice.nodeInfo.legalIdentity)
|
||||
payHandle.returnValue.getOrThrow()
|
||||
}
|
||||
}
|
||||
|
@ -126,10 +126,7 @@ class CordaRPCOpsImplTest {
|
||||
|
||||
network.runNetwork()
|
||||
|
||||
rpc.startFlow(::CashPaymentFlow,
|
||||
Amount(100, Issued(PartyAndReference(aliceNode.info.legalIdentity, OpaqueBytes(ByteArray(1, { 1 }))), USD)),
|
||||
aliceNode.info.legalIdentity
|
||||
)
|
||||
rpc.startFlow(::CashPaymentFlow, Amount(100, USD), aliceNode.info.legalIdentity)
|
||||
|
||||
network.runNetwork()
|
||||
|
||||
|
@ -6,7 +6,6 @@ import com.google.common.util.concurrent.ListenableFuture
|
||||
import net.corda.core.*
|
||||
import net.corda.core.contracts.DOLLARS
|
||||
import net.corda.core.contracts.DummyState
|
||||
import net.corda.core.contracts.issuedBy
|
||||
import net.corda.core.crypto.Party
|
||||
import net.corda.core.crypto.generateKeyPair
|
||||
import net.corda.core.flows.FlowException
|
||||
@ -326,9 +325,7 @@ class StateMachineManagerTests {
|
||||
notary1.info.notaryIdentity))
|
||||
// We pay a couple of times, the notary picking should go round robin
|
||||
for (i in 1 .. 3) {
|
||||
node1.services.startFlow(CashPaymentFlow(
|
||||
500.DOLLARS.issuedBy(node1.info.legalIdentity.ref(0x01)),
|
||||
node2.info.legalIdentity))
|
||||
node1.services.startFlow(CashPaymentFlow(500.DOLLARS, node2.info.legalIdentity))
|
||||
net.runNetwork()
|
||||
}
|
||||
val endpoint = net.messagingNetwork.endpoint(notary1.net.myAddress as InMemoryMessagingNetwork.PeerHandle)!!
|
||||
|
Reference in New Issue
Block a user