mirror of
https://github.com/corda/corda.git
synced 2025-01-18 10:46:38 +00:00
ENT-3256 Cleaner way to override (#4862)
This commit is contained in:
parent
25851c78a3
commit
061db8b1a1
@ -184,7 +184,7 @@ abstract class AbstractNode<S>(val configuration: NodeConfiguration,
|
|||||||
@Suppress("LeakingThis")
|
@Suppress("LeakingThis")
|
||||||
val vaultService = makeVaultService(keyManagementService, servicesForResolution, database, cordappLoader).tokenize()
|
val vaultService = makeVaultService(keyManagementService, servicesForResolution, database, cordappLoader).tokenize()
|
||||||
val nodeProperties = NodePropertiesPersistentStore(StubbedNodeUniqueIdProvider::value, database, cacheFactory)
|
val nodeProperties = NodePropertiesPersistentStore(StubbedNodeUniqueIdProvider::value, database, cacheFactory)
|
||||||
open val flowLogicRefFactory = FlowLogicRefFactoryImpl(cordappLoader.appClassLoader)
|
val flowLogicRefFactory = makeFlowLogicRefFactoryImpl()
|
||||||
// TODO Cancelling parameters updates - if we do that, how we ensure that no one uses cancelled parameters in the transactions?
|
// TODO Cancelling parameters updates - if we do that, how we ensure that no one uses cancelled parameters in the transactions?
|
||||||
val networkMapUpdater = NetworkMapUpdater(
|
val networkMapUpdater = NetworkMapUpdater(
|
||||||
networkMapCache,
|
networkMapCache,
|
||||||
@ -541,6 +541,9 @@ abstract class AbstractNode<S>(val configuration: NodeConfiguration,
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Extracted into a function to allow overriding in subclasses.
|
||||||
|
protected open fun makeFlowLogicRefFactoryImpl() = FlowLogicRefFactoryImpl(cordappLoader.appClassLoader)
|
||||||
|
|
||||||
private fun makeCordappLoader(configuration: NodeConfiguration, versionInfo: VersionInfo): CordappLoader {
|
private fun makeCordappLoader(configuration: NodeConfiguration, versionInfo: VersionInfo): CordappLoader {
|
||||||
val generatedCordapps = mutableListOf(VirtualCordapp.generateCore(versionInfo))
|
val generatedCordapps = mutableListOf(VirtualCordapp.generateCore(versionInfo))
|
||||||
notaryLoader?.builtInNotary?.let { notaryImpl ->
|
notaryLoader?.builtInNotary?.let { notaryImpl ->
|
||||||
|
Loading…
Reference in New Issue
Block a user