mirror of
https://github.com/corda/corda.git
synced 2024-12-23 23:02:29 +00:00
Merge pull request #135 from corda/rnicoll-require-message
Correct message when checking signing keys
This commit is contained in:
commit
21194f2894
@ -119,7 +119,7 @@ inline fun <reified T : MoveCommand> verifyMoveCommand(inputs: List<OwnableState
|
||||
val command = commands.requireSingleCommand<T>()
|
||||
val keysThatSigned = command.signers.toSet()
|
||||
requireThat {
|
||||
"the owning keys are the same as the signing keys" by keysThatSigned.containsAll(owningPubKeys)
|
||||
"the owning keys are a subset of the signing keys" by keysThatSigned.containsAll(owningPubKeys)
|
||||
}
|
||||
return command.value
|
||||
}
|
||||
|
@ -405,7 +405,7 @@ class Obligation<P> : Contract {
|
||||
val owningPubKeys = inputs.filter { it is State<P> }.map { (it as State<P>).beneficiary }.toSet()
|
||||
val keysThatSigned = setLifecycleCommand.signers.toSet()
|
||||
requireThat {
|
||||
"the owning keys are the same as the signing keys" by keysThatSigned.containsAll(owningPubKeys)
|
||||
"the owning keys are a subset of the signing keys" by keysThatSigned.containsAll(owningPubKeys)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ public class CashTestsJava {
|
||||
tx.tweak(tw -> {
|
||||
tw.output(outState);
|
||||
tw.command(getDUMMY_PUBKEY_2(), new Cash.Commands.Move());
|
||||
return tw.failsWith("the owning keys are the same as the signing keys");
|
||||
return tw.failsWith("the owning keys are a subset of the signing keys");
|
||||
});
|
||||
tx.tweak(tw -> {
|
||||
tw.output(outState);
|
||||
|
@ -99,7 +99,7 @@ class CashTests {
|
||||
tweak {
|
||||
output { outState }
|
||||
command(DUMMY_PUBKEY_2) { Cash.Commands.Move() }
|
||||
this `fails with` "the owning keys are the same as the signing keys"
|
||||
this `fails with` "the owning keys are a subset of the signing keys"
|
||||
}
|
||||
tweak {
|
||||
output { outState }
|
||||
|
@ -66,7 +66,7 @@ class ObligationTests {
|
||||
tweak {
|
||||
output { outState }
|
||||
command(DUMMY_PUBKEY_2) { Obligation.Commands.Move() }
|
||||
this `fails with` "the owning keys are the same as the signing keys"
|
||||
this `fails with` "the owning keys are a subset of the signing keys"
|
||||
}
|
||||
tweak {
|
||||
output { outState }
|
||||
|
Loading…
Reference in New Issue
Block a user