mirror of
https://github.com/corda/corda.git
synced 2024-12-24 07:06:44 +00:00
Merge pull request #7874 from corda/adel/ENT-12402
ENT-12402: In external verifier pass the rotated keys to attachment c…
This commit is contained in:
commit
844b33ee94
@ -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