mirror of
https://github.com/corda/corda.git
synced 2024-12-23 14:52:29 +00:00
Mock node uses hard coded EnclaveClient instance
This commit is contained in:
parent
a37486c6d7
commit
dc840008f2
@ -289,18 +289,12 @@ open class MockServices private constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal fun makeEncryptedTransactionService(cordappLoader: CordappLoader, initialIdentity: TestIdentity): EncryptedTransactionService {
|
internal fun makeEncryptedTransactionService(cordappLoader: CordappLoader, initialIdentity: TestIdentity): EncryptedTransactionService {
|
||||||
val clazz = cordappLoader.cordapps
|
|
||||||
.map {
|
val clazz = try {
|
||||||
it.cordappClasses
|
Class.forName("cbdc.r3.corda.conclave.client.CBDCEnclaveClient").name
|
||||||
}
|
}catch(e: Exception) {
|
||||||
.flatten()
|
null
|
||||||
.firstOrNull {
|
}
|
||||||
try {
|
|
||||||
it.contains("EnclaveClient") && Class.forName(it).interfaces.contains(CordaEnclaveClient::class.java)
|
|
||||||
} catch (e: NoClassDefFoundError) {
|
|
||||||
false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return clazz?.let {
|
return clazz?.let {
|
||||||
EncryptedTransactionService(Class.forName(it).getDeclaredConstructor(CordaX500Name::class.java).newInstance(initialIdentity.name) as CordaEnclaveClient)
|
EncryptedTransactionService(Class.forName(it).getDeclaredConstructor(CordaX500Name::class.java).newInstance(initialIdentity.name) as CordaEnclaveClient)
|
||||||
|
Loading…
Reference in New Issue
Block a user