Merge pull request #135 from corda/rnicoll-require-message

Correct message when checking signing keys
This commit is contained in:
Ross Nicoll 2017-01-10 14:31:42 +00:00 committed by GitHub
commit 21194f2894
5 changed files with 5 additions and 5 deletions

View File

@ -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
}

View File

@ -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)
}
}

View File

@ -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);

View File

@ -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 }

View File

@ -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 }