ENT-12108 ReceiveFinalityFlow returns a transaction that is not signed by the notary (#7804)

This commit is contained in:
Rick Parker 2024-08-15 07:06:58 +01:00 committed by GitHub
parent d888dea3c2
commit cc44c77ed4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -518,7 +518,8 @@ class FinalityFlowTests : WithFinality {
@Suspendable @Suspendable
override fun call() { override fun call() {
val handleNotaryError = otherSide.receive<Boolean>().unwrap { it } val handleNotaryError = otherSide.receive<Boolean>().unwrap { it }
subFlow(ReceiveFinalityFlow(otherSide, handlePropagatedNotaryError = handleNotaryError)) val stx = subFlow(ReceiveFinalityFlow(otherSide, handlePropagatedNotaryError = handleNotaryError))
stx.verify(serviceHub)
} }
} }

View File

@ -127,6 +127,7 @@ open class ReceiveTransactionFlow constructor(private val otherSideSession: Flow
(serviceHub as ServiceHubCoreInternal).finalizeTransactionWithExtraSignatures(stx, notarySignatures, statesToRecord) (serviceHub as ServiceHubCoreInternal).finalizeTransactionWithExtraSignatures(stx, notarySignatures, statesToRecord)
logger.info("Peer finalised transaction with notary signature.") logger.info("Peer finalised transaction with notary signature.")
} }
return stx + notarySignatures
} catch (e: NotaryException) { } catch (e: NotaryException) {
logger.info("Peer received notary error.") logger.info("Peer received notary error.")
val overrideHandlePropagatedNotaryError = handlePropagatedNotaryError val overrideHandlePropagatedNotaryError = handlePropagatedNotaryError