From e91872b78d4d1388db73979d0b3a1e8b4b580fed Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Thu, 31 Mar 2016 18:20:58 +0200 Subject: [PATCH] Minor: support another dummy timestamping service in the IRS contract --- contracts/src/main/kotlin/contracts/IRS.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/contracts/src/main/kotlin/contracts/IRS.kt b/contracts/src/main/kotlin/contracts/IRS.kt index a1d173558a..19f99b1b10 100644 --- a/contracts/src/main/kotlin/contracts/IRS.kt +++ b/contracts/src/main/kotlin/contracts/IRS.kt @@ -8,6 +8,14 @@ package contracts +import com.fasterxml.jackson.core.JsonGenerator +import com.fasterxml.jackson.core.JsonParser +import com.fasterxml.jackson.databind.DeserializationContext +import com.fasterxml.jackson.databind.JsonDeserializer +import com.fasterxml.jackson.databind.JsonSerializer +import com.fasterxml.jackson.databind.SerializerProvider +import com.fasterxml.jackson.databind.annotation.JsonDeserialize +import com.fasterxml.jackson.databind.annotation.JsonSerialize import core.* import core.crypto.SecureHash import org.apache.commons.jexl3.JexlBuilder @@ -407,7 +415,7 @@ class InterestRateSwap() : Contract { */ override fun verify(tx: TransactionForVerification) { val command = tx.commands.requireSingleCommand() - val time = tx.commands.getTimestampByName("Mock Company 0", "Bank A")?.midpoint + val time = tx.commands.getTimestampByName("Mock Company 0", "European Timestamping Service", "Bank A")?.midpoint if (time == null) throw IllegalArgumentException("must be timestamped") val irs = tx.outStates.filterIsInstance().single()