mirror of
https://github.com/corda/corda.git
synced 2025-05-29 13:44:25 +00:00
Updated based on feedback to check that the encumbered state does not refer to itself as the encumbrance.
This commit is contained in:
parent
6ba301b6b8
commit
ee65d4490b
@ -58,7 +58,7 @@ class TransactionEncumbranceTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun trivial() {
|
fun trivial() {
|
||||||
// A transaction containing an input state that is encumbered must fail if the encumbrance is missing.
|
// A transaction containing an input state that is encumbered must fail if the encumbrance is missing on the inputs.
|
||||||
assertFailsWith(TransactionVerificationException.TransactionMissingEncumbranceException::class) {
|
assertFailsWith(TransactionVerificationException.TransactionMissingEncumbranceException::class) {
|
||||||
transaction {
|
transaction {
|
||||||
input { encumberedState }
|
input { encumberedState }
|
||||||
@ -83,9 +83,7 @@ class TransactionEncumbranceTests {
|
|||||||
assertFailsWith(TransactionVerificationException.TransactionMissingEncumbranceException::class) {
|
assertFailsWith(TransactionVerificationException.TransactionMissingEncumbranceException::class) {
|
||||||
transaction {
|
transaction {
|
||||||
input { unencumberedState }
|
input { unencumberedState }
|
||||||
input { unencumberedState }
|
// The encumbered state refers to an encumbrance in position 1, so there should be at least 2 outputs.
|
||||||
output { unencumberedState }
|
|
||||||
// The encumbered state refers to an encumbrance in position 1, so what follows is wrong.
|
|
||||||
output { encumberedState }
|
output { encumberedState }
|
||||||
command(DUMMY_PUBKEY_1) { Cash.Commands.Move() }
|
command(DUMMY_PUBKEY_1) { Cash.Commands.Move() }
|
||||||
this.verifies()
|
this.verifies()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user