You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.3 KiB
40 lines
1.3 KiB
|
|
/**
|
|
* Used during transcation verification when a source txout is missing.
|
|
*
|
|
* When a transaction is being verified by the memory pool this error causes
|
|
* it to be added to the orphan pool instead of being discarded.
|
|
*/
|
|
function MissingSourceError(msg, missingTxHash) {
|
|
// TODO: Since this happens in normal operation, perhaps we should
|
|
// avoid generating a whole stack trace.
|
|
Error.call(this);
|
|
Error.captureStackTrace(this, arguments.callee);
|
|
this.message = msg;
|
|
this.missingTxHash = missingTxHash;
|
|
this.name = 'MissingSourceError';
|
|
};
|
|
|
|
MissingSourceError.prototype.__proto__ = Error.prototype;
|
|
|
|
exports.MissingSourceError = MissingSourceError;
|
|
|
|
/**
|
|
* Used in several places to indicate invalid data.
|
|
*
|
|
* We want to distinguish invalid data errors from program errors, so we use
|
|
* this exception to indicate the former.
|
|
*/
|
|
function VerificationError(msg, missingTxHash) {
|
|
// TODO: Since this happens in normal operation, perhaps we should
|
|
// avoid generating a whole stack trace.
|
|
Error.call(this);
|
|
Error.captureStackTrace(this, arguments.callee);
|
|
this.message = msg;
|
|
this.missingTxHash = missingTxHash;
|
|
this.name = 'VerificationError';
|
|
};
|
|
|
|
VerificationError.prototype.__proto__ = Error.prototype;
|
|
|
|
exports.VerificationError = VerificationError;
|
|
|