mirror of
https://github.com/corda/corda.git
synced 2024-12-20 05:28:21 +00:00
Merge branch 'cbdc/poc-encrypt-backchain-sf' of https://github.com/corda/corda into cbdc/poc-encrypt-backchain-sf
This commit is contained in:
commit
e8662c27a7
@ -289,18 +289,12 @@ 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 {
|
||||
EncryptedTransactionService(Class.forName(it).getDeclaredConstructor(CordaX500Name::class.java).newInstance(initialIdentity.name) as CordaEnclaveClient)
|
||||
|
Loading…
Reference in New Issue
Block a user