mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
CORDA-540: Correctly mark AttachmentConstraint to be CordaSerializable (#1496)
Or else many core/contract unit tests failing in AMQP mode
This commit is contained in:
parent
988e3e5007
commit
abac314b31
@ -3,13 +3,13 @@ package net.corda.core.contracts
|
||||
import net.corda.core.serialization.CordaSerializable
|
||||
|
||||
/** Constrain which contract-code-containing attachments can be used with a [ContractState]. */
|
||||
@CordaSerializable
|
||||
interface AttachmentConstraint {
|
||||
/** Returns whether the given contract attachments can be used with the [ContractState] associated with this constraint object. */
|
||||
fun isSatisfiedBy(attachments: List<Attachment>): Boolean
|
||||
}
|
||||
|
||||
/** An [AttachmentConstraint] where [isSatisfiedBy] always returns true. */
|
||||
@CordaSerializable
|
||||
object AlwaysAcceptAttachmentConstraint : AttachmentConstraint {
|
||||
override fun isSatisfiedBy(attachments: List<Attachment>) = true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user