Attachment query with contract version, related to CORDA-2150, CORDA-2157 (#4357)

TransactionBuilder loads attachment using attachment storage instead of CordappLoader,
contract class version is now Integer (format and stored in db as Integer).
This commit is contained in:
szymonsztuka
2018-12-06 11:28:53 +00:00
committed by GitHub
parent 2833013119
commit d2d13c1dfc
22 changed files with 130 additions and 54 deletions

View File

@ -35,6 +35,9 @@ interface TestCordapp {
/** Returns whether the CorDapp should be jar signed. */
val signJar: Boolean
/** Returns the contract version, default to 1 if not specified. */
val cordaContractVersion: Int
/** Return a copy of this [TestCordapp] but with the specified name. */
fun withName(name: String): TestCordapp
@ -57,6 +60,8 @@ interface TestCordapp {
* Optionally can pass in the location of an existing java key store to use */
fun signJar(keyStorePath: Path? = null): TestCordappImpl
fun withCordaContractVersion(version: Int): TestCordappImpl
class Factory {
companion object {
/**

View File

@ -10,6 +10,7 @@ data class TestCordappImpl(override val name: String,
override val targetVersion: Int,
override val config: Map<String, Any>,
override val packages: Set<String>,
override val cordaContractVersion: Int = 1,
override val signJar: Boolean = false,
val keyStorePath: Path? = null,
val classes: Set<Class<*>>
@ -25,6 +26,8 @@ data class TestCordappImpl(override val name: String,
override fun withTargetVersion(targetVersion: Int): TestCordappImpl = copy(targetVersion = targetVersion)
override fun withCordaContractVersion(version: Int): TestCordappImpl = copy(cordaContractVersion = version)
override fun withConfig(config: Map<String, Any>): TestCordappImpl = copy(config = config)
override fun signJar(keyStorePath: Path?): TestCordappImpl = copy(signJar = true, keyStorePath = keyStorePath)