diff --git a/core/src/main/kotlin/net/corda/core/contracts/BelongsToContract.kt b/core/src/main/kotlin/net/corda/core/contracts/BelongsToContract.kt index def0a947fa..44b1523c7a 100644 --- a/core/src/main/kotlin/net/corda/core/contracts/BelongsToContract.kt +++ b/core/src/main/kotlin/net/corda/core/contracts/BelongsToContract.kt @@ -1,6 +1,7 @@ package net.corda.core.contracts import kotlin.reflect.KClass +import net.corda.core.contracts.TransactionVerificationException.TransactionContractConflictException /** * This annotation is required by any [ContractState] which needs to ensure that it is only ever processed as part of a @@ -12,7 +13,8 @@ import kotlin.reflect.KClass * checked to ensure that their [ContractState]s match with their [Contract]s as specified either by this annotation, or * by their inner/outer class relationship. * - * The transaction will write a warning to the log if any mismatch is detected. + * The transaction will write a warning to the log (for corDapps with a target version less than 4) or + * fail with a [TransactionContractConflictException] if any mismatch is detected. * * @param value The class of the [Contract] to which states of the annotated [ContractState] belong. */ diff --git a/core/src/main/kotlin/net/corda/core/flows/NotaryError.kt b/core/src/main/kotlin/net/corda/core/flows/NotaryError.kt index d849f29324..835f0291ab 100644 --- a/core/src/main/kotlin/net/corda/core/flows/NotaryError.kt +++ b/core/src/main/kotlin/net/corda/core/flows/NotaryError.kt @@ -28,7 +28,7 @@ sealed class NotaryError { /** Specifies which states have already been consumed in another transaction. */ val consumedStates: Map ) : NotaryError() { - override fun toString() = "One or more input states have already been used in other transactions. Conflicting state count: ${consumedStates.size}, consumption details:\n" + + override fun toString() = "One or more input states or referenced states have already been used as input states in other transactions. Conflicting state count: ${consumedStates.size}, consumption details:\n" + "${consumedStates.asSequence().joinToString(",\n", limit = 5) { it.key.toString() + " -> " + it.value }}.\n" + "To find out if any of the conflicting transactions have been generated by this node you can use the hashLookup Corda shell command." } diff --git a/finance/contracts/build.gradle b/finance/contracts/build.gradle index 89ac236954..77207e090a 100644 --- a/finance/contracts/build.gradle +++ b/finance/contracts/build.gradle @@ -39,12 +39,19 @@ task testJar(type: Jar) { jar { baseName 'corda-finance-contracts' + manifest { + attributes('Corda-Revision': 'n/a') + attributes('Corda-Vendor': 'Corda Open Source') + } } artifacts { testArtifacts testJar } cordapp { + signing { + enabled false + } targetPlatformVersion corda_platform_version.toInteger() minimumPlatformVersion 1 contract {