mirror of
https://github.com/corda/corda.git
synced 2025-06-16 22:28:15 +00:00
Enable anonymisation (#1073)
* Enabled confidential identities in: ** IssuerFlow ** Trader demo ** Two party deal flows ** Two party trade flows ** Corda RPC tests ** Cash flows ** Integration testing tutorial ** Node monitor model tests ** CollectSignatureFlow * Relay local node's confidential identities to counterparties when requesting transaction signatures, so counterparties know where the inputs come from. * Require all identities are known in finality flow * Ensure all identities in FxTransactionBuildTutorial are known to each other * Add flow for syncing identities to a number of counterparties * Address PR comments * Disable anonymisation in example code * Revert unnecessary changes remaining from earlier rebases * Corrections after rebase * Remove unneeded identity registration Remove unneeded identity registrations from tests, which sometimes cause duplicated entries in the database * Revert accidental change in examples * Revert unneeded imports * Revert changes to CoreFlowHandlers.kt
This commit is contained in:
@ -116,10 +116,10 @@ class CordaRPCOpsImplTest {
|
||||
)
|
||||
}
|
||||
|
||||
result.returnValue.getOrThrow()
|
||||
val anonymisedRecipient = result.returnValue.getOrThrow().recipient!!
|
||||
val expectedState = Cash.State(Amount(quantity,
|
||||
Issued(aliceNode.info.legalIdentity.ref(ref), GBP)),
|
||||
recipient)
|
||||
anonymisedRecipient)
|
||||
|
||||
// Query vault via RPC
|
||||
val cash = rpc.vaultQueryBy<Cash.State>()
|
||||
@ -141,7 +141,6 @@ class CordaRPCOpsImplTest {
|
||||
vaultTrackCash = rpc.vaultTrackBy<Cash.State>().updates
|
||||
}
|
||||
|
||||
val anonymous = false
|
||||
val result = rpc.startFlow(::CashIssueFlow,
|
||||
100.DOLLARS,
|
||||
OpaqueBytes(ByteArray(1, { 1 })),
|
||||
@ -150,7 +149,7 @@ class CordaRPCOpsImplTest {
|
||||
|
||||
mockNet.runNetwork()
|
||||
|
||||
rpc.startFlow(::CashPaymentFlow, 100.DOLLARS, aliceNode.info.legalIdentity, anonymous)
|
||||
rpc.startFlow(::CashPaymentFlow, 100.DOLLARS, aliceNode.info.legalIdentity)
|
||||
|
||||
mockNet.runNetwork()
|
||||
|
||||
@ -183,7 +182,7 @@ class CordaRPCOpsImplTest {
|
||||
require(stx.tx.inputs.isEmpty())
|
||||
require(stx.tx.outputs.size == 1)
|
||||
val signaturePubKeys = stx.sigs.map { it.by }.toSet()
|
||||
// Only Alice signed
|
||||
// Only Alice signed, as issuer
|
||||
val aliceKey = aliceNode.info.legalIdentity.owningKey
|
||||
require(signaturePubKeys.size <= aliceKey.keys.size)
|
||||
require(aliceKey.isFulfilledBy(signaturePubKeys))
|
||||
@ -194,7 +193,7 @@ class CordaRPCOpsImplTest {
|
||||
require(stx.tx.outputs.size == 1)
|
||||
val signaturePubKeys = stx.sigs.map { it.by }.toSet()
|
||||
// Alice and Notary signed
|
||||
require(aliceNode.info.legalIdentity.owningKey.isFulfilledBy(signaturePubKeys))
|
||||
require(aliceNode.services.keyManagementService.filterMyKeys(signaturePubKeys).toList().isNotEmpty())
|
||||
require(notaryNode.info.notaryIdentity.owningKey.isFulfilledBy(signaturePubKeys))
|
||||
}
|
||||
)
|
||||
|
@ -337,10 +337,10 @@ class FlowFrameworkTests {
|
||||
node1.services.startFlow(CashIssueFlow(
|
||||
2000.DOLLARS,
|
||||
OpaqueBytes.of(0x01),
|
||||
notary1.info.notaryIdentity))
|
||||
notary1.info.notaryIdentity)).resultFuture.getOrThrow()
|
||||
// We pay a couple of times, the notary picking should go round robin
|
||||
for (i in 1..3) {
|
||||
val flow = node1.services.startFlow(CashPaymentFlow(500.DOLLARS, node2.info.legalIdentity, anonymous = false))
|
||||
val flow = node1.services.startFlow(CashPaymentFlow(500.DOLLARS, node2.info.legalIdentity))
|
||||
mockNet.runNetwork()
|
||||
flow.resultFuture.getOrThrow()
|
||||
}
|
||||
|
Reference in New Issue
Block a user