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:
Andrius Dagys
2017-02-22 11:11:35 +00:00
committed by GitHub
parent c7abbe8791
commit 006faa82a1
8 changed files with 36 additions and 33 deletions

View File

@ -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