mirror of
https://github.com/corda/corda.git
synced 2024-12-19 21:17:58 +00:00
ENT-12402: In external verifier pass the rotated keys to attachment cache loader cache so that LedgerTransaction picks it up.
This commit is contained in:
parent
7c591de607
commit
4c25e674b8
@ -56,19 +56,18 @@ class ExternalVerifier(private val channel: SocketChannel) {
|
|||||||
private val log = contextLogger()
|
private val log = contextLogger()
|
||||||
}
|
}
|
||||||
|
|
||||||
private val attachmentsClassLoaderCache: AttachmentsClassLoaderCache
|
|
||||||
private val attachmentFixups = AttachmentFixups()
|
private val attachmentFixups = AttachmentFixups()
|
||||||
private val parties: OptionalCache<PublicKey, Party>
|
private val parties: OptionalCache<PublicKey, Party>
|
||||||
private val attachments: OptionalCache<SecureHash, AttachmentWithTrust>
|
private val attachments: OptionalCache<SecureHash, AttachmentWithTrust>
|
||||||
private val networkParametersMap: OptionalCache<SecureHash, NetworkParameters>
|
private val networkParametersMap: OptionalCache<SecureHash, NetworkParameters>
|
||||||
private val trustedClassAttachments: Cache<String, List<SecureHash>>
|
private val trustedClassAttachments: Cache<String, List<SecureHash>>
|
||||||
|
private val cacheFactory = ExternalVerifierNamedCacheFactory()
|
||||||
|
|
||||||
|
private lateinit var attachmentsClassLoaderCache: AttachmentsClassLoaderCache
|
||||||
private lateinit var currentNetworkParameters: NetworkParameters
|
private lateinit var currentNetworkParameters: NetworkParameters
|
||||||
private lateinit var rotatedKeys: RotatedKeys
|
private lateinit var rotatedKeys: RotatedKeys
|
||||||
|
|
||||||
init {
|
init {
|
||||||
val cacheFactory = ExternalVerifierNamedCacheFactory()
|
|
||||||
attachmentsClassLoaderCache = AttachmentsClassLoaderCacheImpl(cacheFactory)
|
|
||||||
parties = cacheFactory.buildNamed("ExternalVerifier_parties")
|
parties = cacheFactory.buildNamed("ExternalVerifier_parties")
|
||||||
attachments = cacheFactory.buildNamed("ExternalVerifier_attachments")
|
attachments = cacheFactory.buildNamed("ExternalVerifier_attachments")
|
||||||
networkParametersMap = cacheFactory.buildNamed("ExternalVerifier_networkParameters")
|
networkParametersMap = cacheFactory.buildNamed("ExternalVerifier_networkParameters")
|
||||||
@ -98,6 +97,7 @@ class ExternalVerifier(private val channel: SocketChannel) {
|
|||||||
currentNetworkParameters = initialisation.currentNetworkParameters
|
currentNetworkParameters = initialisation.currentNetworkParameters
|
||||||
networkParametersMap.put(initialisation.serializedCurrentNetworkParameters.hash, Optional.of(currentNetworkParameters))
|
networkParametersMap.put(initialisation.serializedCurrentNetworkParameters.hash, Optional.of(currentNetworkParameters))
|
||||||
rotatedKeys = initialisation.rotatedKeys
|
rotatedKeys = initialisation.rotatedKeys
|
||||||
|
attachmentsClassLoaderCache = AttachmentsClassLoaderCacheImpl(cacheFactory, rotatedKeys)
|
||||||
log.info("External verifier initialised")
|
log.info("External verifier initialised")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user