Last active
June 14, 2019 07:41
-
-
Save lankydan/21a095d5c75216df9c39857e67468e84 to your computer and use it in GitHub Desktop.
Simple Broadcasting of a transaction - BroadcastTransactionFlow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@InitiatingFlow | |
class BroadcastTransactionFlow( | |
private val stx: SignedTransaction, | |
private val recipients: List<Party> | |
) : FlowLogic<Unit>() { | |
@Suspendable | |
override fun call() { | |
for (recipient in recipients) { | |
val session = initiateFlow(recipient) | |
subFlow(SendTransactionFlow(session, stx)) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment