Commit cc03ee81 authored by Daniel Connolly's avatar Daniel Connolly

rename VerifyException to OpVerifyFailed, to avoid confusion with VerificationException

parent f9ef9d6b
......@@ -95,6 +95,10 @@ public class ScriptException extends VerificationException {
public OpReturnException() { super("the script called OP_RETURN"); }
}
public static class OpVerifyFailed extends ScriptException {
public OpVerifyFailed() { super("the VERIFY failed"); }
}
public static class PubKeyCountException extends ScriptException {
public PubKeyCountException() { super("there are too many, or not enough, public keys"); }
}
......@@ -130,8 +134,4 @@ public class ScriptException extends VerificationException {
public static class UnbalancedConditionalException extends ScriptException {
public UnbalancedConditionalException() { super("the script contains an unbalanced conditional"); }
}
public static class VerifyException extends ScriptException {
public VerifyException() { super("the VERIFY failed"); }
}
}
......@@ -1073,7 +1073,7 @@ public class Script {
if (stack.isEmpty())
throw new InvalidStackOperationException();
if (!castToBool(stack.pollLast()))
throw new VerifyException();
throw new OpVerifyFailed();
break;
case OP_RETURN:
throw new OpReturnException();
......
......@@ -20,7 +20,6 @@ import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Charsets;
import org.bitcoinj.core.Coin;
import org.bitcoinj.core.ScriptException;
import org.bitcoinj.core.ScriptException.*;
import org.bitcoinj.core.Transaction;
import org.bitcoinj.core.VerificationException;
......@@ -156,7 +155,7 @@ public class ScriptDataDrivenTest {
result = "STACK_SIZE";
} catch (UnbalancedConditionalException e) {
result = "UNBALANCED_CONDITIONAL";
} catch (VerifyException e) {
} catch (OpVerifyFailed e) {
result = "VERIFY";
} catch (VerificationException e) {
result = "UNKNOWN_ERROR";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment