mirror of
https://github.com/corda/corda.git
synced 2024-12-22 06:17:55 +00:00
Don't use single line style for verify
This commit is contained in:
parent
696b9741dd
commit
413060aa6d
@ -450,11 +450,11 @@ class InterestRateSwap() : Contract {
|
|||||||
fun extractCommands(tx: TransactionForContract): Collection<AuthenticatedObject<CommandData>>
|
fun extractCommands(tx: TransactionForContract): Collection<AuthenticatedObject<CommandData>>
|
||||||
= tx.commands.select<Commands>()
|
= tx.commands.select<Commands>()
|
||||||
|
|
||||||
override fun verify(tx: TransactionForContract) = verifyClauses(tx,
|
override fun verify(tx: TransactionForContract) {
|
||||||
listOf(Clause.Timestamped(),
|
verifyClauses(tx,
|
||||||
Clause.Group(),
|
listOf(Clause.Timestamped(), Clause.Group(), LinearState.ClauseVerifier(State::class.java)),
|
||||||
LinearState.ClauseVerifier(State::class.java)),
|
|
||||||
extractCommands(tx))
|
extractCommands(tx))
|
||||||
|
}
|
||||||
|
|
||||||
interface Clause {
|
interface Clause {
|
||||||
/**
|
/**
|
||||||
|
@ -11,9 +11,11 @@ import java.security.PublicKey
|
|||||||
class DummyLinearContract: Contract {
|
class DummyLinearContract: Contract {
|
||||||
override val legalContractReference: SecureHash = SecureHash.sha256("Test")
|
override val legalContractReference: SecureHash = SecureHash.sha256("Test")
|
||||||
|
|
||||||
override fun verify(tx: TransactionForContract) = verifyClauses(tx,
|
override fun verify(tx: TransactionForContract) {
|
||||||
|
verifyClauses(tx,
|
||||||
listOf(LinearState.ClauseVerifier(State::class.java)),
|
listOf(LinearState.ClauseVerifier(State::class.java)),
|
||||||
emptyList())
|
emptyList())
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class State(
|
class State(
|
||||||
|
Loading…
Reference in New Issue
Block a user