mirror of
https://github.com/corda/corda.git
synced 2025-01-11 15:32:49 +00:00
Minor: Unit testing: allow a subset of transactions in a group to be signed.
This commit is contained in:
parent
bdadaffbc0
commit
eb47d8af4d
@ -316,8 +316,8 @@ class TransactionGroupDSL<T : ContractState>(private val stateType: Class<T>) {
|
|||||||
GraphVisualiser(this as TransactionGroupDSL<ContractState>).display()
|
GraphVisualiser(this as TransactionGroupDSL<ContractState>).display()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun signAll(vararg extraKeys: KeyPair): List<SignedTransaction> {
|
fun signAll(txnsToSign: List<WireTransaction> = txns, vararg extraKeys: KeyPair): List<SignedTransaction> {
|
||||||
return txns.map { wtx ->
|
return txnsToSign.map { wtx ->
|
||||||
val allPubKeys = wtx.commands.flatMap { it.pubkeys }.toMutableSet()
|
val allPubKeys = wtx.commands.flatMap { it.pubkeys }.toMutableSet()
|
||||||
val bits = wtx.serialize()
|
val bits = wtx.serialize()
|
||||||
require(bits == wtx.serialized)
|
require(bits == wtx.serialized)
|
||||||
|
Loading…
Reference in New Issue
Block a user