mirror of
https://github.com/corda/corda.git
synced 2025-06-13 12:48:18 +00:00
Merge remote-tracking branch 'open/master' into os-merge-d620e71
# Conflicts: # node/src/main/kotlin/net/corda/node/serialization/kryo/Kryo.kt
This commit is contained in:
@ -42,6 +42,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static net.corda.core.contracts.ContractsDSL.requireThat;
|
||||
import static net.corda.core.crypto.Crypto.generateKeyPair;
|
||||
|
||||
@ -665,7 +666,7 @@ public class FlowCookbookJava {
|
||||
requireThat(require -> {
|
||||
// Any additional checking we see fit...
|
||||
DummyState outputState = (DummyState) stx.getTx().getOutputs().get(0).getData();
|
||||
assert (outputState.getMagicNumber() == 777);
|
||||
checkArgument(outputState.getMagicNumber() == 777);
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
@ -645,7 +645,7 @@ class ResponderFlow(val counterpartySession: FlowSession) : FlowLogic<Unit>() {
|
||||
override fun checkTransaction(stx: SignedTransaction) = requireThat {
|
||||
// Any additional checking we see fit...
|
||||
val outputState = stx.tx.outputsOfType<DummyState>().single()
|
||||
assert(outputState.magicNumber == 777)
|
||||
require(outputState.magicNumber == 777)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user