mirror of
https://github.com/corda/corda.git
synced 2024-12-21 22:07:55 +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
|
import net.corda.core.serialization.CordaSerializable
|
||||||
|
|
||||||
/** Constrain which contract-code-containing attachments can be used with a [ContractState]. */
|
/** Constrain which contract-code-containing attachments can be used with a [ContractState]. */
|
||||||
|
@CordaSerializable
|
||||||
interface AttachmentConstraint {
|
interface AttachmentConstraint {
|
||||||
/** Returns whether the given contract attachments can be used with the [ContractState] associated with this constraint object. */
|
/** Returns whether the given contract attachments can be used with the [ContractState] associated with this constraint object. */
|
||||||
fun isSatisfiedBy(attachments: List<Attachment>): Boolean
|
fun isSatisfiedBy(attachments: List<Attachment>): Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
/** An [AttachmentConstraint] where [isSatisfiedBy] always returns true. */
|
/** An [AttachmentConstraint] where [isSatisfiedBy] always returns true. */
|
||||||
@CordaSerializable
|
|
||||||
object AlwaysAcceptAttachmentConstraint : AttachmentConstraint {
|
object AlwaysAcceptAttachmentConstraint : AttachmentConstraint {
|
||||||
override fun isSatisfiedBy(attachments: List<Attachment>) = true
|
override fun isSatisfiedBy(attachments: List<Attachment>) = true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user