Address Service: Include default callback earlier

This commit is contained in:
Braydon Fuller 2016-01-18 16:03:37 -05:00
parent d4f2df5c51
commit e498e0fac2
1 changed files with 8 additions and 8 deletions

View File

@ -231,6 +231,14 @@ AddressService.prototype.transactionLeaveHandler = function(txInfo) {
AddressService.prototype.transactionHandler = function(txInfo, callback) {
var self = this;
if (!callback) {
callback = function(err) {
if (err) {
return log.error(err);
}
};
}
if (this.node.stopping) {
return callback();
}
@ -246,14 +254,6 @@ AddressService.prototype.transactionHandler = function(txInfo, callback) {
this.transactionOutputHandler(messages, tx, i, !txInfo.mempool);
}
if (!callback) {
callback = function(err) {
if (err) {
return log.error(err);
}
};
}
function finish(err) {
if (err) {
return callback(err);