Re-throw wrapped ScriptException in FullPrunedBlockChain.

This commit is contained in:
Mike Hearn 2012-11-01 14:40:05 +01:00
parent cba837cfef
commit da0f8a791b
2 changed files with 7 additions and 2 deletions

View File

@ -255,9 +255,10 @@ public class FullPrunedBlockChain extends AbstractBlockChain {
throw new VerificationException("Too many P2SH SigOps in block");
}
try {
in.getScriptSig().correctlySpends(new Transaction(params, tx), index, new Script(params, prevOut.getScriptBytes(), 0, prevOut.getScriptBytes().length));
in.getScriptSig().correctlySpends(new Transaction(params, tx), index,
new Script(params, prevOut.getScriptBytes(), 0, prevOut.getScriptBytes().length));
} catch (ScriptException e) {
throw new VerificationException("Error verifying script: " + e.getMessage());
throw new VerificationException("Error verifying script", e);
}
blockStore.removeUnspentTransactionOutput(prevOut);
txOutsSpent.add(prevOut);

View File

@ -21,4 +21,8 @@ public class VerificationException extends Exception {
public VerificationException(String msg) {
super(msg);
}
public VerificationException(String msg, Throwable t) {
super(msg, t);
}
}