Improve the flow commit API.

Make FinalityFlow do more, and be used more consistently.

Add a new waitForLedgerCommit API that is intended to be used at the end of flows, or at any other point where a flow wants to wait for a transaction to finalise (but the finalisation flow is being done by someone else).

Update the docs a bit.
This commit is contained in:
Mike Hearn
2017-01-06 10:42:04 +01:00
parent f8c1996a48
commit cc20a10225
23 changed files with 374 additions and 217 deletions

View File

@ -55,10 +55,7 @@ class SellerFlow(val otherParty: Party,
amount,
cpOwnerKey,
progressTracker.getChildProgressTracker(TRADING)!!)
val tradeTX: SignedTransaction = subFlow(seller, shareParentSessions = true)
serviceHub.recordTransactions(listOf(tradeTX))
return tradeTX
return subFlow(seller, shareParentSessions = true)
}
@Suspendable