mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
revert singleton removal
This commit is contained in:
parent
7fa54b4cb9
commit
5447c23f24
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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>()
|
||||
|
||||
|
@ -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.")
|
||||
|
Loading…
Reference in New Issue
Block a user