mirror of
https://github.com/corda/corda.git
synced 2024-12-24 15:16:45 +00:00
Encumbrances implemented by reference to an index of an output state
This commit is contained in:
parent
2c7d6fc053
commit
b4be27080c
@ -14,8 +14,8 @@ import static com.r3corda.core.testing.CoreTestUtils.*;
|
|||||||
public class CashTestsJava {
|
public class CashTestsJava {
|
||||||
private final OpaqueBytes defaultRef = new OpaqueBytes(new byte[]{1});
|
private final OpaqueBytes defaultRef = new OpaqueBytes(new byte[]{1});
|
||||||
private final PartyAndReference defaultIssuer = getMEGA_CORP().ref(defaultRef);
|
private final PartyAndReference defaultIssuer = getMEGA_CORP().ref(defaultRef);
|
||||||
private final Cash.State inState = new Cash.State(issuedBy(DOLLARS(1000), defaultIssuer), getDUMMY_PUBKEY_1());
|
private final Cash.State inState = new Cash.State(issuedBy(DOLLARS(1000), defaultIssuer), getDUMMY_PUBKEY_1(), null);
|
||||||
private final Cash.State outState = new Cash.State(inState.getAmount(), getDUMMY_PUBKEY_2());
|
private final Cash.State outState = new Cash.State(inState.getAmount(), getDUMMY_PUBKEY_2(), null);
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void trivial() {
|
public void trivial() {
|
||||||
@ -25,7 +25,7 @@ public class CashTestsJava {
|
|||||||
tx.failsWith("the amounts balance");
|
tx.failsWith("the amounts balance");
|
||||||
|
|
||||||
tx.tweak(tw -> {
|
tx.tweak(tw -> {
|
||||||
tw.output(new Cash.State(issuedBy(DOLLARS(2000), defaultIssuer), getDUMMY_PUBKEY_2()));
|
tw.output(new Cash.State(issuedBy(DOLLARS(2000), defaultIssuer), getDUMMY_PUBKEY_2(), null));
|
||||||
return tw.failsWith("the amounts balance");
|
return tw.failsWith("the amounts balance");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user