mirror of
https://github.com/corda/corda.git
synced 2025-06-18 07:08:15 +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:
@ -55,8 +55,8 @@ class NotaryServiceTests {
|
||||
}
|
||||
|
||||
val future = runNotaryClient(stx)
|
||||
val signature = future.getOrThrow()
|
||||
signature.verifyWithECDSA(stx.id)
|
||||
val signatures = future.getOrThrow()
|
||||
signatures.forEach { it.verifyWithECDSA(stx.id) }
|
||||
}
|
||||
|
||||
@Test fun `should sign a unique transaction without a timestamp`() {
|
||||
@ -68,8 +68,8 @@ class NotaryServiceTests {
|
||||
}
|
||||
|
||||
val future = runNotaryClient(stx)
|
||||
val signature = future.getOrThrow()
|
||||
signature.verifyWithECDSA(stx.id)
|
||||
val signatures = future.getOrThrow()
|
||||
signatures.forEach { it.verifyWithECDSA(stx.id) }
|
||||
}
|
||||
|
||||
@Test fun `should report error for transaction with an invalid timestamp`() {
|
||||
@ -132,7 +132,7 @@ class NotaryServiceTests {
|
||||
notaryError.conflict.verified()
|
||||
}
|
||||
|
||||
private fun runNotaryClient(stx: SignedTransaction): ListenableFuture<DigitalSignature.WithKey> {
|
||||
private fun runNotaryClient(stx: SignedTransaction): ListenableFuture<List<DigitalSignature.WithKey>> {
|
||||
val flow = NotaryFlow.Client(stx)
|
||||
val future = clientNode.services.startFlow(flow).resultFuture
|
||||
net.runNetwork()
|
||||
|
@ -78,7 +78,7 @@ class ValidatingNotaryServiceTests {
|
||||
assertEquals(setOf(expectedMissingKey), missingKeys)
|
||||
}
|
||||
|
||||
private fun runClient(stx: SignedTransaction): ListenableFuture<DigitalSignature.WithKey> {
|
||||
private fun runClient(stx: SignedTransaction): ListenableFuture<List<DigitalSignature.WithKey>> {
|
||||
val flow = NotaryFlow.Client(stx)
|
||||
val future = clientNode.services.startFlow(flow).resultFuture
|
||||
net.runNetwork()
|
||||
|
Reference in New Issue
Block a user