mirror of
https://github.com/corda/corda.git
synced 2025-02-20 17:33:15 +00:00
Minor: make TransactionBuilder.signWith return the builder for ease of use from Java.
This commit is contained in:
parent
ad6c59d742
commit
cbf6aa0e27
@ -94,10 +94,11 @@ open class TransactionBuilder(
|
||||
/** The signatures that have been collected so far - might be incomplete! */
|
||||
protected val currentSigs = arrayListOf<DigitalSignature.WithKey>()
|
||||
|
||||
fun signWith(key: KeyPair) {
|
||||
fun signWith(key: KeyPair): TransactionBuilder {
|
||||
check(currentSigs.none { it.by == key.public }) { "This partial transaction was already signed by ${key.public}" }
|
||||
val data = toWireTransaction().serialize()
|
||||
addSignatureUnchecked(key.signWithECDSA(data.bits))
|
||||
return this
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user