Minor: Unit testing: allow a subset of transactions in a group to be signed.

This commit is contained in:
Mike Hearn 2016-02-17 15:38:51 +01:00
parent bdadaffbc0
commit eb47d8af4d

View File

@ -316,8 +316,8 @@ class TransactionGroupDSL<T : ContractState>(private val stateType: Class<T>) {
GraphVisualiser(this as TransactionGroupDSL<ContractState>).display()
}
fun signAll(vararg extraKeys: KeyPair): List<SignedTransaction> {
return txns.map { wtx ->
fun signAll(txnsToSign: List<WireTransaction> = txns, vararg extraKeys: KeyPair): List<SignedTransaction> {
return txnsToSign.map { wtx ->
val allPubKeys = wtx.commands.flatMap { it.pubkeys }.toMutableSet()
val bits = wtx.serialize()
require(bits == wtx.serialized)