A temporary fix for contract upgrade transactions:

during LedgerTransaction verification run the right logic based on whether
it contains the UpgradeCommand.

Move ContractUpgradeFlowTest away from createSomeNodes()

Remove assembleBareTx as it's not used
This commit is contained in:
Andrius Dagys
2017-09-27 17:43:30 +01:00
parent c0dd8d338e
commit f8a43a8331
9 changed files with 44 additions and 68 deletions

View File

@ -1,8 +1,8 @@
package net.corda.testing.contracts
import net.corda.core.contracts.*
import net.corda.core.flows.ContractUpgradeFlow
import net.corda.core.identity.AbstractParty
import net.corda.core.internal.UpgradeCommand
import net.corda.core.node.ServicesForResolution
import net.corda.core.transactions.LedgerTransaction
import net.corda.core.transactions.TransactionBuilder
@ -35,7 +35,6 @@ class DummyContractV2 : UpgradedContract<DummyContract.State, DummyContractV2.St
}
override fun verify(tx: LedgerTransaction) {
if (tx.commands.any { it.value is UpgradeCommand }) ContractUpgradeFlow.verify(tx)
// Other verifications.
}
// DOCEND 1