mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
Fix a bug in ContractUpgradeFlowTest where it wasn't actually checking both nodes.
This commit is contained in:
parent
006faa82a1
commit
036b2597d3
@ -79,18 +79,24 @@ class ContractUpgradeFlowTest {
|
||||
|
||||
val result = resultFuture.get()
|
||||
|
||||
listOf(a, b).forEach {
|
||||
val stx = databaseTransaction(a.database) { a.services.storageService.validatedTransactions.getTransaction(result.ref.txhash) }
|
||||
requireNotNull(stx)
|
||||
fun check(node: MockNetwork.MockNode) {
|
||||
val nodeStx = databaseTransaction(node.database) {
|
||||
node.services.storageService.validatedTransactions.getTransaction(result.ref.txhash)
|
||||
}
|
||||
requireNotNull(nodeStx)
|
||||
|
||||
// Verify inputs.
|
||||
val input = databaseTransaction(a.database) { a.services.storageService.validatedTransactions.getTransaction(stx!!.tx.inputs.single().txhash) }
|
||||
val input = databaseTransaction(node.database) {
|
||||
node.services.storageService.validatedTransactions.getTransaction(nodeStx!!.tx.inputs.single().txhash)
|
||||
}
|
||||
requireNotNull(input)
|
||||
assertTrue(input!!.tx.outputs.single().data is DummyContract.State)
|
||||
|
||||
// Verify outputs.
|
||||
assertTrue(stx!!.tx.outputs.single().data is DummyContractV2.State)
|
||||
assertTrue(nodeStx!!.tx.outputs.single().data is DummyContractV2.State)
|
||||
}
|
||||
check(a)
|
||||
check(b)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user