Fixed variable initialization.

This commit is contained in:
Chris Kleeschulte 2017-10-26 17:50:41 -04:00
parent f1356bf5aa
commit 5e1e67d4e6
No known key found for this signature in database
GPG Key ID: 33195D27EF6BDB7F
3 changed files with 4 additions and 3 deletions

View File

@ -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);

View File

@ -215,7 +215,6 @@ MempoolService.prototype._getAddressOperations = function(tx, reverse) {
return ops;
};
MempoolService.prototype._onTransaction = function(tx) {

View File

@ -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)