class FetchTransactionsFlow : FetchDataFlow<SignedTransaction, SignedTransaction>
Given a set of tx hashes (IDs), either loads them from local disk or asks the remote peer to provide them.
A malicious response in which the data provided by the remote peer does not hash to the requested hash results in FetchDataFlow.DownloadedVsRequestedDataMismatch being thrown. If the remote peer doesn't have an entry, it results in a FetchDataFlow.HashNotFound exception. Note that returned transactions are not inserted into the database, because it's up to the caller to actually verify the transactions are valid.
<init> |
FetchTransactionsFlow(requests: Set<SecureHash>, otherSide: Party)
Given a set of tx hashes (IDs), either loads them from local disk or asks the remote peer to provide them. |
otherSide |
val otherSide: Party |
requests |
val requests: Set<SecureHash> |
load |
fun load(txid: SecureHash): SignedTransaction? |
call |
open fun call(): Result<T>
This is where you fill out your business logic. The returned object will usually be ignored, but can be helpful if this flow is meant to be used as a subflow. |