From 56ad64c52416ba9f6f3ca0d0a892ada3e8f5e8b9 Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Fri, 16 Jun 2017 13:43:09 +0100 Subject: [PATCH] Correct construction of anonymous parties Correct construction of anonymous parties to use the first certificate (the target) rather than the last (the trust root). Worked because early tests used single certificate paths, but later work introducing multi-certificate paths reveal it's rather broken. --- core/src/main/kotlin/net/corda/flows/TxKeyFlow.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/kotlin/net/corda/flows/TxKeyFlow.kt b/core/src/main/kotlin/net/corda/flows/TxKeyFlow.kt index 3493b1cfad..ff50739ffc 100644 --- a/core/src/main/kotlin/net/corda/flows/TxKeyFlow.kt +++ b/core/src/main/kotlin/net/corda/flows/TxKeyFlow.kt @@ -84,6 +84,6 @@ object TxKeyFlow { val identity: AnonymousParty) { constructor(myIdentity: Pair) : this(myIdentity.second, myIdentity.first, - AnonymousParty(myIdentity.second.certificates.last().publicKey)) + AnonymousParty(myIdentity.second.certificates.first().publicKey)) } }