diff --git a/lib/services/block/index.js b/lib/services/block/index.js index ff98f78b..20ffc810 100644 --- a/lib/services/block/index.js +++ b/lib/services/block/index.js @@ -494,9 +494,11 @@ BlockService.prototype._onReorg = function(commonAncestorHash, block, callback) async.mapSeries(services, function(service, next) { if(!service.onReorg) { + log.debug('Block Service: skipping reorg for: ' + service.name + ' service.'); return setImmediate(next); } + log.info('Block Service: Reorging: ' + service.name + ' service.'); service.onReorg.call(service, [commonAncestorHash, [block]], next); }, callback); diff --git a/lib/services/mempool/index.js b/lib/services/mempool/index.js index 6e3278d3..61207ae2 100644 --- a/lib/services/mempool/index.js +++ b/lib/services/mempool/index.js @@ -215,7 +215,6 @@ MempoolService.prototype._getAddressOperations = function(tx, reverse) { return ops; - }; MempoolService.prototype._onTransaction = function(tx) { diff --git a/lib/services/transaction/index.js b/lib/services/transaction/index.js index 46b98738..933e1eaf 100644 --- a/lib/services/transaction/index.js +++ b/lib/services/transaction/index.js @@ -404,8 +404,8 @@ TransactionService.prototype.onReorg = function(args, callback) { }); // remove all the spent index information - for(j = 0; j < tx.inputs.length; j++) { - var input = tx.inputs[j]; + for(var k = 0; k < tx.inputs.length; k++) { + var input = tx.inputs[k]; removalOps.push({ type: 'del', key: self._encoding.encodeSpentKey(input.prevout.txid(), input.prevout.index)