mirror of
https://github.com/corda/corda.git
synced 2025-06-17 14:48:16 +00:00
Clean up IssuerFlow
* Switch to using anonymous party as recipient * Enable anonymisation for issuance as well as move in issuer flows. * Pass notary into issuer flow rather than taking a notary at random from the network map. * Enable anonymisation in Bank of Corda RPC test * Parameterize issuer flow tests into anonymous and deanonymised versions
This commit is contained in:
@ -8,6 +8,7 @@ import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.flows.FlowInitiator
|
||||
import net.corda.core.flows.FlowLogic
|
||||
import net.corda.core.flows.StartableByRPC
|
||||
import net.corda.core.identity.AbstractParty
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.messaging.*
|
||||
import net.corda.core.node.NodeInfo
|
||||
@ -178,6 +179,7 @@ class CordaRPCOpsImpl(
|
||||
override fun partyFromName(name: String) = services.identityService.partyFromName(name)
|
||||
override fun partyFromX500Name(x500Name: X500Name) = services.identityService.partyFromX500Name(x500Name)
|
||||
override fun partiesFromName(query: String, exactMatch: Boolean): Set<Party> = services.identityService.partiesFromName(query, exactMatch)
|
||||
override fun nodeIdentityFromParty(party: AbstractParty): NodeInfo? = services.networkMapCache.getNodeByLegalIdentity(party)
|
||||
|
||||
override fun registeredFlows(): List<String> = services.rpcFlows.map { it.name }.sorted()
|
||||
|
||||
|
@ -509,12 +509,13 @@ class TwoPartyTradeFlowTests {
|
||||
@Suspendable
|
||||
override fun call(): SignedTransaction {
|
||||
send(buyer, Pair(notary.notaryIdentity, price))
|
||||
val key = serviceHub.keyManagementService.freshKey()
|
||||
return subFlow(Seller(
|
||||
buyer,
|
||||
notary,
|
||||
assetToSell,
|
||||
price,
|
||||
serviceHub.legalIdentityKey))
|
||||
AnonymousParty(key)))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user