mirror of
https://github.com/corda/corda.git
synced 2025-02-27 19:46:38 +00:00
Minor: couple of tiny reformattings.
This commit is contained in:
parent
daff65f220
commit
5df1caf0ca
core/src/main/kotlin/com/r3corda/core
@ -120,9 +120,9 @@ open class TransactionBuilder(
|
|||||||
fun toSignedTransaction(checkSufficientSignatures: Boolean = true): SignedTransaction {
|
fun toSignedTransaction(checkSufficientSignatures: Boolean = true): SignedTransaction {
|
||||||
if (checkSufficientSignatures) {
|
if (checkSufficientSignatures) {
|
||||||
val gotKeys = currentSigs.map { it.by }.toSet()
|
val gotKeys = currentSigs.map { it.by }.toSet()
|
||||||
val missing = signers - gotKeys
|
val missing: Set<PublicKey> = signers - gotKeys
|
||||||
if (missing.isNotEmpty())
|
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))
|
return SignedTransaction(toWireTransaction().serialize(), ArrayList(currentSigs))
|
||||||
}
|
}
|
||||||
@ -131,7 +131,6 @@ open class TransactionBuilder(
|
|||||||
|
|
||||||
fun addInputState(stateRef: StateRef, notary: Party) {
|
fun addInputState(stateRef: StateRef, notary: Party) {
|
||||||
check(currentSigs.isEmpty())
|
check(currentSigs.isEmpty())
|
||||||
|
|
||||||
signers.add(notary.owningKey)
|
signers.add(notary.owningKey)
|
||||||
inputs.add(stateRef)
|
inputs.add(stateRef)
|
||||||
}
|
}
|
||||||
|
@ -53,9 +53,7 @@ interface TransactionDSLInterpreter : Verifies, OutputStateLookup {
|
|||||||
fun tweak(dsl: TransactionDSL<TransactionDSLInterpreter>.() -> EnforceVerifyOrFail): EnforceVerifyOrFail
|
fun tweak(dsl: TransactionDSL<TransactionDSLInterpreter>.() -> EnforceVerifyOrFail): EnforceVerifyOrFail
|
||||||
}
|
}
|
||||||
|
|
||||||
class TransactionDSL<out T : TransactionDSLInterpreter> (val interpreter: T) :
|
class TransactionDSL<out T : TransactionDSLInterpreter>(val interpreter: T) : TransactionDSLInterpreter by interpreter {
|
||||||
TransactionDSLInterpreter by interpreter {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Looks up the output label and adds the found state as an input.
|
* 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.
|
* @param stateLabel The label of the output state specified when calling [TransactionDSLInterpreter._output] and friends.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user