diff --git a/lib/services/address/index.js b/lib/services/address/index.js index 9ba17ea9..5c38d3ca 100644 --- a/lib/services/address/index.js +++ b/lib/services/address/index.js @@ -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);