Updates to new resolve tx flows... (#3766)

This commit is contained in:
Roger Willis 2018-08-10 16:19:09 +01:00 committed by GitHub
parent 68bfb7ff66
commit 75ac13815b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,7 +98,9 @@ open class DataVendingFlow(val otherSideSession: FlowSession, val payload: Any)
}
@Suspendable
private fun getInputTransactions(tx: SignedTransaction): Set<SecureHash> = tx.inputs.map { it.txhash }.toSet()
private fun getInputTransactions(tx: SignedTransaction): Set<SecureHash> {
return tx.inputs.map { it.txhash }.toSet() + tx.references.map { it.txhash }.toSet()
}
private class TransactionAuthorisationFilter(private val authorisedTransactions: MutableSet<SecureHash> = mutableSetOf(), val acceptAll: Boolean = false) {
fun isAuthorised(txId: SecureHash) = acceptAll || authorisedTransactions.contains(txId)