From e498e0fac2ebe30fa8d1444c6dbd14eef2f3222b Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Mon, 18 Jan 2016 16:03:37 -0500 Subject: [PATCH] Address Service: Include default callback earlier --- lib/services/address/index.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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);