mirror of
https://github.com/corda/corda.git
synced 2025-06-19 07:38:22 +00:00
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:
@ -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 {
|
||||
/**
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user