mirror of
https://github.com/corda/corda.git
synced 2025-01-29 15:43:55 +00:00
CORDA-2388 Deprecate CommandWithParties.signingParties
(#4520)
* Deprecate `CommandWithParties.signingParties` as it should not be used in contract verification code as it is non-deterministic. * Remove the remaining usage in contract verification code - replaced by signers collection.
This commit is contained in:
parent
79601681da
commit
7bbe4668d6
@ -237,6 +237,7 @@ interface MoveCommand : CommandData {
|
||||
data class CommandWithParties<out T : CommandData>(
|
||||
val signers: List<PublicKey>,
|
||||
/** If any public keys were recognised, the looked up institutions are available here */
|
||||
@Deprecated("Should not be used in contract verification code as it is non-deterministic, will be disabled for some future target platform version onwards and will take effect only for CorDapps targeting those versions.")
|
||||
val signingParties: List<Party>,
|
||||
val value: T
|
||||
)
|
||||
|
@ -315,7 +315,7 @@ class Obligation<P : Any> : Contract {
|
||||
val outputAmount = outputs.sumObligations<P>()
|
||||
val issueCommands = tx.commands.select<Commands.Issue>()
|
||||
requireThat {
|
||||
"output states are issued by a command signer" using (issuer.party in issueCommand.signingParties)
|
||||
"output states are issued by a command signer" using (issuer.party.owningKey in issueCommand.signers)
|
||||
"output values sum to more than the inputs" using (outputAmount > inputAmount)
|
||||
"there is only a single issue command" using (issueCommands.count() == 1)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user