From 5df1caf0cad9ae8c11ae631220a2f924338359d3 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Fri, 29 Jul 2016 15:19:14 +0200 Subject: [PATCH] Minor: couple of tiny reformattings. --- .../kotlin/com/r3corda/core/contracts/TransactionBuilder.kt | 5 ++--- .../com/r3corda/core/testing/TransactionDSLInterpreter.kt | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/core/src/main/kotlin/com/r3corda/core/contracts/TransactionBuilder.kt b/core/src/main/kotlin/com/r3corda/core/contracts/TransactionBuilder.kt index e032b2c6bb..59a76b1c9f 100644 --- a/core/src/main/kotlin/com/r3corda/core/contracts/TransactionBuilder.kt +++ b/core/src/main/kotlin/com/r3corda/core/contracts/TransactionBuilder.kt @@ -120,9 +120,9 @@ open class TransactionBuilder( fun toSignedTransaction(checkSufficientSignatures: Boolean = true): SignedTransaction { if (checkSufficientSignatures) { val gotKeys = currentSigs.map { it.by }.toSet() - val missing = signers - gotKeys + val missing: Set = signers - gotKeys if (missing.isNotEmpty()) - throw IllegalStateException("Missing signatures on the transaction for the public keys: ${missing.map { it.toStringShort() }}") + throw IllegalStateException("Missing signatures on the transaction for the public keys: ${missing.toStringsShort()}") } return SignedTransaction(toWireTransaction().serialize(), ArrayList(currentSigs)) } @@ -131,7 +131,6 @@ open class TransactionBuilder( fun addInputState(stateRef: StateRef, notary: Party) { check(currentSigs.isEmpty()) - signers.add(notary.owningKey) inputs.add(stateRef) } diff --git a/core/src/main/kotlin/com/r3corda/core/testing/TransactionDSLInterpreter.kt b/core/src/main/kotlin/com/r3corda/core/testing/TransactionDSLInterpreter.kt index 44d74fcf7b..6d39d9c4fb 100644 --- a/core/src/main/kotlin/com/r3corda/core/testing/TransactionDSLInterpreter.kt +++ b/core/src/main/kotlin/com/r3corda/core/testing/TransactionDSLInterpreter.kt @@ -53,9 +53,7 @@ interface TransactionDSLInterpreter : Verifies, OutputStateLookup { fun tweak(dsl: TransactionDSL.() -> EnforceVerifyOrFail): EnforceVerifyOrFail } -class TransactionDSL (val interpreter: T) : - TransactionDSLInterpreter by interpreter { - +class TransactionDSL(val interpreter: T) : TransactionDSLInterpreter by interpreter { /** * Looks up the output label and adds the found state as an input. * @param stateLabel The label of the output state specified when calling [TransactionDSLInterpreter._output] and friends.