Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Corda customising transaction validation - Base responder
@InitiatedBy(SendMessageFlow::class)
open class SendMessageResponder(private val session: FlowSession) : FlowLogic<SignedTransaction>() {
open fun extraTransactionValidation(stx: SignedTransaction) {
// to be implemented by subtype flows - otherwise do nothing
}
@Suspendable
final override fun call(): SignedTransaction {
val stx = subFlow(object : SignTransactionFlow(session) {
override fun checkTransaction(stx: SignedTransaction) {
extraTransactionValidation(stx)
}
})
// save transaction
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.