From 1be32da0f58b0029f355a9665c6d13a248e45d04 Mon Sep 17 00:00:00 2001 From: RogerWillis Date: Mon, 21 Nov 2016 15:00:55 +0000 Subject: [PATCH] Added comment around usage of 'parties' in DealStates. --- .../kotlin/net/corda/core/contracts/Structures.kt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/core/src/main/kotlin/net/corda/core/contracts/Structures.kt b/core/src/main/kotlin/net/corda/core/contracts/Structures.kt index cf5a3940822..92f6c2f9966 100644 --- a/core/src/main/kotlin/net/corda/core/contracts/Structures.kt +++ b/core/src/main/kotlin/net/corda/core/contracts/Structures.kt @@ -276,7 +276,19 @@ interface DealState : LinearState { /** Human readable well known reference (e.g. trade reference) */ val ref: String - /** Exposes the Parties involved in a generic way */ + /** + * Exposes the Parties involved in a generic way. + * + * Appears to duplicate [participants] a property of [ContractState]. However [participants] only holds public keys. + * Currently we need to hard code Party objects into [ContractState]s. [Party] objects are a wrapper for public + * keys which also contain some identity information about the public key owner. You can keep track of individual + * parties by adding a property for each one to the state, or you can append parties to the [parties] list if you + * are implementing [DealState]. We need to do this as identity management in Corda is currently incomplete, + * therefore the only way to record identity information is in the [ContractState]s themselves. When identity + * management is completed, parties to a transaction will only record public keys in the [DealState] and through a + * separate process exchange certificates to ascertain identities. Thus decoupling identities from + * [ContractState]s. + * */ val parties: List /**