This commit is contained in:
Christopher Jeffrey 2016-05-03 12:45:56 -07:00
parent aac2f629d0
commit 9aa1e9b8f1
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
3 changed files with 15 additions and 10 deletions

View File

@ -577,7 +577,8 @@ regtest.alertPrivateKey = new Buffer(
'hex'); 'hex');
regtest.alertKey = new Buffer( regtest.alertKey = new Buffer(
'032b7c336bc802421f38063251a6230cc3cd3a9c4282d1673fbb037a4fd4f7408c', 'hex'); '032b7c336bc802421f38063251a6230cc3cd3a9c4282d1673fbb037a4fd4f7408c',
'hex');
regtest.checkpoints = {}; regtest.checkpoints = {};
regtest.checkpoints.tsLastCheckpoint = 0; regtest.checkpoints.tsLastCheckpoint = 0;
@ -704,7 +705,8 @@ segnet3.magic = 0xcaea962e;
segnet3.port = 28333; segnet3.port = 28333;
segnet3.alertKey = new Buffer( segnet3.alertKey = new Buffer(
'0300000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63', 'hex'); '0300000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63',
'hex');
segnet3.checkpoints = {}; segnet3.checkpoints = {};
segnet3.checkpoints.tsLastCheckpoint = 0; segnet3.checkpoints.tsLastCheckpoint = 0;
@ -812,7 +814,8 @@ segnet4.magic = 0xc4a1abdc;
segnet4.port = 28901; segnet4.port = 28901;
segnet4.alertKey = new Buffer( segnet4.alertKey = new Buffer(
'0300000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63', 'hex'); '0300000000000000000000003b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63',
'hex');
segnet4.checkpoints = {}; segnet4.checkpoints = {};
segnet4.checkpoints.tsLastCheckpoint = 0; segnet4.checkpoints.tsLastCheckpoint = 0;

View File

@ -586,11 +586,10 @@ TX.prototype.verify = function verify(index, force, flags) {
flags flags
); );
} catch (e) { } catch (e) {
if (e.type === 'ScriptError') { if (e.type === 'ScriptError')
bcoin.debug('Script verification error: %s', e.message); bcoin.debug('Script verification error: %s', e.message);
} else { else
bcoin.debug('Script interpreter threw: %s', e.stack + ''); bcoin.debug('Script interpreter threw: %s', e.stack + '');
}
return false; return false;
} }
} }

View File

@ -115,7 +115,7 @@ Workers.prototype.alloc = function alloc(job) {
*/ */
Workers.prototype.execute = function execute(method, args, timeout, callback) { Workers.prototype.execute = function execute(method, args, timeout, callback) {
var job = this.uid; var job = this.uid++;
var child; var child;
if (job > 0xffffffff) { if (job > 0xffffffff) {
@ -123,9 +123,12 @@ Workers.prototype.execute = function execute(method, args, timeout, callback) {
job = this.uid++; job = this.uid++;
} }
if (!timeout)
timeout = this.timeout;
child = this.alloc(job); child = this.alloc(job);
child.execute(job, method, args, timeout || this.timeout, callback); child.execute(job, method, args, timeout, callback);
return child; return child;
}; };
@ -289,7 +292,7 @@ Worker.prototype.send = function send(job, name, items) {
Worker.prototype.sendEvent = function sendEvent() { Worker.prototype.sendEvent = function sendEvent() {
var items = Array.prototype.slice.call(arguments); var items = Array.prototype.slice.call(arguments);
return this.write(this.framer.packet(0, 'event', items)); return this.send(0, 'event', items);
}; };
/** /**
@ -439,7 +442,7 @@ Master.prototype.send = function send(job, name, items) {
Master.prototype.sendEvent = function sendEvent() { Master.prototype.sendEvent = function sendEvent() {
var items = Array.prototype.slice.call(arguments); var items = Array.prototype.slice.call(arguments);
return this.write(this.framer.packet(0, 'event', items)); return this.send(0, 'event', items);
}; };
/** /**