Mock node uses hard coded EnclaveClient instance

This commit is contained in:
adam.houston 2022-03-28 16:32:49 +01:00
parent a37486c6d7
commit dc840008f2

View File

@ -289,17 +289,11 @@ open class MockServices private constructor(
}
internal fun makeEncryptedTransactionService(cordappLoader: CordappLoader, initialIdentity: TestIdentity): EncryptedTransactionService {
val clazz = cordappLoader.cordapps
.map {
it.cordappClasses
}
.flatten()
.firstOrNull {
try {
it.contains("EnclaveClient") && Class.forName(it).interfaces.contains(CordaEnclaveClient::class.java)
} catch (e: NoClassDefFoundError) {
false
}
val clazz = try {
Class.forName("cbdc.r3.corda.conclave.client.CBDCEnclaveClient").name
}catch(e: Exception) {
null
}
return clazz?.let {