Add internal service hub

This commit is contained in:
vanjatomic 2022-03-31 15:16:55 +01:00
parent 96e610ee0f
commit 1d03751702
2 changed files with 5 additions and 2 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.14-CONCLAVE-SNAPSHOT
cordaVersion=4.8.5.15-CONCLAVE-SNAPSHOT
versionSuffix=
gradlePluginsVersion=5.0.12
kotlinVersion=1.2.71

View File

@ -1066,7 +1066,10 @@ abstract class AbstractNode<S>(val configuration: NodeConfiguration,
null
}
return clazz?.let {
EncryptedTransactionService(Class.forName(it).getDeclaredConstructor(CordaX500Name::class.java, ServiceHub::class.java).newInstance(configuration.myLegalName, servicesForResolution) as CordaEnclaveClient)
val internalServiceHub = ServicesForResolutionImpl(identityService, attachments, cordappProvider, networkParametersStorage, transactionStorage, EncryptedTransactionService()).also {
attachments.servicesForResolution = it
}
EncryptedTransactionService(Class.forName(it).getDeclaredConstructor(CordaX500Name::class.java, ServiceHub::class.java).newInstance(configuration.myLegalName, internalServiceHub) as CordaEnclaveClient)
} ?: run {
EncryptedTransactionService()
}