mirror of
https://github.com/corda/corda.git
synced 2025-06-12 20:28:18 +00:00
Make notary flow return a collection of signatures to support the BFT… (#264)
Make notary flow return a collection of signatures to support the BFT notary. For a single-node or RAFT notary it would just contain a single signature.
This commit is contained in:
@ -80,8 +80,8 @@ class SellerFlow(val otherParty: Party,
|
||||
tx.signWith(keyPair)
|
||||
|
||||
// Get the notary to sign the timestamp
|
||||
val notarySig = subFlow(NotaryFlow.Client(tx.toSignedTransaction(false)))
|
||||
tx.addSignatureUnchecked(notarySig)
|
||||
val notarySigs = subFlow(NotaryFlow.Client(tx.toSignedTransaction(false)))
|
||||
notarySigs.forEach { tx.addSignatureUnchecked(it) }
|
||||
|
||||
// Commit it to local storage.
|
||||
val stx = tx.toSignedTransaction(true)
|
||||
@ -96,7 +96,7 @@ class SellerFlow(val otherParty: Party,
|
||||
CommercialPaper().generateMove(builder, issuance.tx.outRef(0), ownedBy)
|
||||
builder.signWith(keyPair)
|
||||
val notarySignature = subFlow(NotaryFlow.Client(builder.toSignedTransaction(false)))
|
||||
builder.addSignatureUnchecked(notarySignature)
|
||||
notarySignature.forEach { builder.addSignatureUnchecked(it) }
|
||||
val tx = builder.toSignedTransaction(true)
|
||||
serviceHub.recordTransactions(listOf(tx))
|
||||
tx
|
||||
|
Reference in New Issue
Block a user