Minor: couple of tiny reformattings.

This commit is contained in:
Mike Hearn 2016-07-29 15:19:14 +02:00
parent daff65f220
commit 5df1caf0ca
2 changed files with 3 additions and 6 deletions

View File

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

View File

@ -53,9 +53,7 @@ interface TransactionDSLInterpreter : Verifies, OutputStateLookup {
fun tweak(dsl: TransactionDSL<TransactionDSLInterpreter>.() -> EnforceVerifyOrFail): EnforceVerifyOrFail
}
class TransactionDSL<out T : TransactionDSLInterpreter> (val interpreter: T) :
TransactionDSLInterpreter by interpreter {
class TransactionDSL<out T : TransactionDSLInterpreter>(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.