Address Service: Include default callback earlier
This commit is contained in:
parent
d4f2df5c51
commit
e498e0fac2
@ -231,6 +231,14 @@ AddressService.prototype.transactionLeaveHandler = function(txInfo) {
|
|||||||
AddressService.prototype.transactionHandler = function(txInfo, callback) {
|
AddressService.prototype.transactionHandler = function(txInfo, callback) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
if (!callback) {
|
||||||
|
callback = function(err) {
|
||||||
|
if (err) {
|
||||||
|
return log.error(err);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
if (this.node.stopping) {
|
if (this.node.stopping) {
|
||||||
return callback();
|
return callback();
|
||||||
}
|
}
|
||||||
@ -246,14 +254,6 @@ AddressService.prototype.transactionHandler = function(txInfo, callback) {
|
|||||||
this.transactionOutputHandler(messages, tx, i, !txInfo.mempool);
|
this.transactionOutputHandler(messages, tx, i, !txInfo.mempool);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!callback) {
|
|
||||||
callback = function(err) {
|
|
||||||
if (err) {
|
|
||||||
return log.error(err);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function finish(err) {
|
function finish(err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return callback(err);
|
return callback(err);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user