Cleaned up TimeWindow and added a bit more docs.

This commit is contained in:
Shams Asari
2017-07-20 13:32:53 +01:00
parent bf98f64269
commit e702025f62
18 changed files with 189 additions and 96 deletions

View File

@ -72,7 +72,7 @@ data class TradeApprovalContract(override val legalContractReference: SecureHash
*/
override fun verify(tx: LedgerTransaction) {
val command = tx.commands.requireSingleCommand<TradeApprovalContract.Commands>()
require(tx.timeWindow?.midpoint != null) { "must have a time-window" }
requireNotNull(tx.timeWindow) { "must have a time-window" }
when (command.value) {
is Commands.Issue -> {
requireThat {