Skip to content

Instantly share code, notes, and snippets.

@lankydan
Last active June 14, 2019 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lankydan/21a095d5c75216df9c39857e67468e84 to your computer and use it in GitHub Desktop.
Save lankydan/21a095d5c75216df9c39857e67468e84 to your computer and use it in GitHub Desktop.
Simple Broadcasting of a transaction - BroadcastTransactionFlow
@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