CORDA-2331 - Code alignment to produce identical finance contracts JAR. (#4482)

* Remove discrepancies between OS and ENT caused by manifest metadata.
Unsigned (until identify why signing causes different .EC file)

* Align comments between OS and ENT.
This commit is contained in:
josecoll 2019-01-02 16:31:25 +00:00 committed by GitHub
parent c1ed8c47ac
commit 87adc1c831
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View File

@ -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.
*/

View File

@ -28,7 +28,7 @@ sealed class NotaryError {
/** Specifies which states have already been consumed in another transaction. */
val consumedStates: Map<StateRef, StateConsumptionDetails>
) : 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."
}

View File

@ -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 {