revert singleton removal

This commit is contained in:
vanjatomic 2022-04-07 12:30:22 +01:00
parent 7fa54b4cb9
commit 5447c23f24
4 changed files with 5 additions and 4 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.24-CONCLAVE-SNAPSHOT
cordaVersion=4.8.5.25-CONCLAVE-SNAPSHOT
versionSuffix=
gradlePluginsVersion=5.0.12
kotlinVersion=1.2.71

View File

@ -16,7 +16,7 @@ import java.util.*
* data to arrive in a single ByteArray
*/
abstract class CordaEnclaveClient(val x500: CordaX500Name, val keyManagementService: KeyManagementService? = null, val identityService: IdentityService? = null) {
abstract class CordaEnclaveClient(val x500: CordaX500Name, val keyManagementService: KeyManagementService? = null, val identityService: IdentityService? = null): SingletonSerializeAsToken() {
// Some exceptions we could throw [TBD - do we want this?]
class RemoteAttestationException(description: String) : FlowException(description)

View File

@ -15,7 +15,7 @@ import net.corda.core.transactions.EncryptedTransaction
import java.util.*
import java.util.concurrent.ConcurrentHashMap
class EncryptedTransactionService(val enclaveClient: CordaEnclaveClient = DummyCordaEnclaveClient(CordaX500Name("PartyDummy", "London", "GB" ))) {
class EncryptedTransactionService(val enclaveClient: CordaEnclaveClient = DummyCordaEnclaveClient(CordaX500Name("PartyDummy", "London", "GB" ))) : SingletonSerializeAsToken() {
private val attestationCache = ConcurrentHashMap<Party, ByteArray>()

View File

@ -437,7 +437,8 @@ constructor(componentGroups: List<ComponentGroup>, val privacySalt: PrivacySalt,
is NotaryChangeWireTransaction -> coreTransaction.resolveOutputComponent(services, stateRef, params)
else -> if(SgxSupport.isInsideEnclave) {
services.validatedTransactions.getEncryptedTransaction(stateRef.txhash)?.let { encryptedTx ->
services.encryptedTransactionService.decryptInputAndRefsForNode(encryptedTx).inputs.singleOrNull { it.ref == stateRef }?.state?.serialize()
//services.encryptedTransactionService.decryptInputAndRefsForNode(encryptedTx).inputs.singleOrNull { it.ref == stateRef }?.state?.serialize()
null
} ?: throw UnsupportedOperationException("Attempting to resolve input ${stateRef.index} of a ${coreTransaction?.javaClass ?: "null"} transaction. This is not supported.")
} else {
throw UnsupportedOperationException("Attempting to resolve input ${stateRef.index} of a ${coreTransaction?.javaClass ?: "null"} transaction. This is not supported.")