From 4c25e674b83790e4973ed155a79ccb1cda6f5a68 Mon Sep 17 00:00:00 2001 From: Adel El-Beik Date: Thu, 7 Nov 2024 11:31:57 +0000 Subject: [PATCH] ENT-12402: In external verifier pass the rotated keys to attachment cache loader cache so that LedgerTransaction picks it up. --- .../src/main/kotlin/net/corda/verifier/ExternalVerifier.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/verifier/src/main/kotlin/net/corda/verifier/ExternalVerifier.kt b/verifier/src/main/kotlin/net/corda/verifier/ExternalVerifier.kt index a1d8df2a53..94e2e009e0 100644 --- a/verifier/src/main/kotlin/net/corda/verifier/ExternalVerifier.kt +++ b/verifier/src/main/kotlin/net/corda/verifier/ExternalVerifier.kt @@ -56,19 +56,18 @@ class ExternalVerifier(private val channel: SocketChannel) { private val log = contextLogger() } - private val attachmentsClassLoaderCache: AttachmentsClassLoaderCache private val attachmentFixups = AttachmentFixups() private val parties: OptionalCache private val attachments: OptionalCache private val networkParametersMap: OptionalCache private val trustedClassAttachments: Cache> + private val cacheFactory = ExternalVerifierNamedCacheFactory() + private lateinit var attachmentsClassLoaderCache: AttachmentsClassLoaderCache private lateinit var currentNetworkParameters: NetworkParameters private lateinit var rotatedKeys: RotatedKeys init { - val cacheFactory = ExternalVerifierNamedCacheFactory() - attachmentsClassLoaderCache = AttachmentsClassLoaderCacheImpl(cacheFactory) parties = cacheFactory.buildNamed("ExternalVerifier_parties") attachments = cacheFactory.buildNamed("ExternalVerifier_attachments") networkParametersMap = cacheFactory.buildNamed("ExternalVerifier_networkParameters") @@ -98,6 +97,7 @@ class ExternalVerifier(private val channel: SocketChannel) { currentNetworkParameters = initialisation.currentNetworkParameters networkParametersMap.put(initialisation.serializedCurrentNetworkParameters.hash, Optional.of(currentNetworkParameters)) rotatedKeys = initialisation.rotatedKeys + attachmentsClassLoaderCache = AttachmentsClassLoaderCacheImpl(cacheFactory, rotatedKeys) log.info("External verifier initialised") }