Temporary workaround for a bug that was exposed by a refactoring. Will follow up with a fix in another PR.

This commit is contained in:
Mike Hearn 2019-02-11 14:15:28 +01:00
parent 55f4071050
commit f541843eff
2 changed files with 4 additions and 9 deletions

View File

@ -1136,12 +1136,6 @@ public static final class net.corda.core.contracts.TransactionVerificationExcept
public <init>(net.corda.core.crypto.SecureHash, String, String, String) public <init>(net.corda.core.crypto.SecureHash, String, String, String)
## ##
@CordaSerializable @CordaSerializable
public static final class net.corda.core.contracts.TransactionVerificationException$UntrustedAttachmentsException extends net.corda.core.contracts.TransactionVerificationException
public <init>(net.corda.core.crypto.SecureHash, java.util.List<? extends net.corda.core.crypto.SecureHash>)
@NotNull
public final java.util.List<net.corda.core.crypto.SecureHash> getIds()
##
@CordaSerializable
public abstract class net.corda.core.contracts.TypeOnlyCommandData extends java.lang.Object implements net.corda.core.contracts.CommandData public abstract class net.corda.core.contracts.TypeOnlyCommandData extends java.lang.Object implements net.corda.core.contracts.CommandData
public <init>() public <init>()
public boolean equals(Object) public boolean equals(Object)

View File

@ -1,5 +1,6 @@
package net.corda.core.contracts package net.corda.core.contracts
import net.corda.core.CordaException
import net.corda.core.DeleteForDJVM import net.corda.core.DeleteForDJVM
import net.corda.core.KeepForDJVM import net.corda.core.KeepForDJVM
import net.corda.core.crypto.SecureHash import net.corda.core.crypto.SecureHash
@ -281,13 +282,13 @@ abstract class TransactionVerificationException(val txId: SecureHash, message: S
Please check the source of this attachment and if it is malicious contact your zone operator to report this incident. Please check the source of this attachment and if it is malicious contact your zone operator to report this incident.
For details see: https://docs.corda.net/network-map.html#network-parameters""".trimIndent(), null) For details see: https://docs.corda.net/network-map.html#network-parameters""".trimIndent(), null)
// TODO: Make this descend from TransactionVerificationException so that untrusted attachments cause flows to be hospitalized.
/** Thrown during classloading upon encountering an untrusted attachment (eg. not in the [TRUSTED_UPLOADERS] list) */ /** Thrown during classloading upon encountering an untrusted attachment (eg. not in the [TRUSTED_UPLOADERS] list) */
@KeepForDJVM @KeepForDJVM
@CordaSerializable @CordaSerializable
class UntrustedAttachmentsException(txId: SecureHash, val ids: List<SecureHash>) : class UntrustedAttachmentsException(txId: SecureHash, val ids: List<SecureHash>) :
TransactionVerificationException(txId, "Attempting to load untrusted transaction attachments: $ids. " + CordaException("Attempting to load untrusted transaction attachments: $ids. " +
"At this time these are not loadable because the DJVM sandbox has not yet been integrated. " + "At this time these are not loadable because the DJVM sandbox has not yet been integrated. " +
"You will need to install that app version yourself, to whitelist it for use. " + "You will need to install that app version yourself, to whitelist it for use. " +
"Please follow the operational steps outlined in https://docs.corda.net/cordapp-build-systems.html#cordapp-contract-attachments to learn more and continue.", "Please follow the operational steps outlined in https://docs.corda.net/cordapp-build-systems.html#cordapp-contract-attachments to learn more and continue.")
null)
} }