Switch to services for resolution

This commit is contained in:
vanjatomic 2022-03-31 15:59:00 +01:00
parent 1d03751702
commit 3af1ae1d56
2 changed files with 4 additions and 6 deletions

View File

@ -2,7 +2,7 @@
# because some versions here need to be matched by app authors in
# their own projects. So don't get fancy with syntax!
cordaVersion=4.8.5.15-CONCLAVE-SNAPSHOT
cordaVersion=4.8.5.16-CONCLAVE-SNAPSHOT
versionSuffix=
gradlePluginsVersion=5.0.12
kotlinVersion=1.2.71

View File

@ -3,11 +3,9 @@ package net.corda.core.conclave.common
import net.corda.core.conclave.common.dto.ConclaveLedgerTxModel
import net.corda.core.conclave.common.dto.EncryptedVerifiableTxAndDependencies
import net.corda.core.conclave.common.dto.InputsAndRefsForNode
import net.corda.core.contracts.ContractState
import net.corda.core.contracts.StateAndRef
import net.corda.core.flows.FlowException
import net.corda.core.identity.CordaX500Name
import net.corda.core.node.ServiceHub
import net.corda.core.node.ServicesForResolution
import net.corda.core.serialization.SingletonSerializeAsToken
import net.corda.core.transactions.EncryptedTransaction
import java.util.*
@ -17,7 +15,7 @@ import java.util.*
* data to arrive in a single ByteArray
*/
abstract class CordaEnclaveClient(val x500: CordaX500Name, val serviceHub: ServiceHub? = null): SingletonSerializeAsToken() {
abstract class CordaEnclaveClient(val x500: CordaX500Name, val serviceHub: ServicesForResolution? = null): SingletonSerializeAsToken() {
// Some exceptions we could throw [TBD - do we want this?]
class RemoteAttestationException(description: String) : FlowException(description)
@ -127,7 +125,7 @@ abstract class CordaEnclaveClient(val x500: CordaX500Name, val serviceHub: Servi
abstract fun decryptInputAndRefsForNode(encryptedTransaction: EncryptedTransaction): InputsAndRefsForNode
}
class DummyCordaEnclaveClient(x500: CordaX500Name, serviceHub: ServiceHub? = null): CordaEnclaveClient(x500, serviceHub) {
class DummyCordaEnclaveClient(x500: CordaX500Name, serviceHub: ServicesForResolution? = null): CordaEnclaveClient(x500, serviceHub) {
override fun getEnclaveInstanceInfo(): ByteArray {
throw UnsupportedOperationException("Add your custom enclave client implementation")