Fixed variable initialization.
This commit is contained in:
parent
f1356bf5aa
commit
5e1e67d4e6
@ -494,9 +494,11 @@ BlockService.prototype._onReorg = function(commonAncestorHash, block, callback)
|
|||||||
async.mapSeries(services, function(service, next) {
|
async.mapSeries(services, function(service, next) {
|
||||||
|
|
||||||
if(!service.onReorg) {
|
if(!service.onReorg) {
|
||||||
|
log.debug('Block Service: skipping reorg for: ' + service.name + ' service.');
|
||||||
return setImmediate(next);
|
return setImmediate(next);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.info('Block Service: Reorging: ' + service.name + ' service.');
|
||||||
service.onReorg.call(service, [commonAncestorHash, [block]], next);
|
service.onReorg.call(service, [commonAncestorHash, [block]], next);
|
||||||
|
|
||||||
}, callback);
|
}, callback);
|
||||||
|
|||||||
@ -215,7 +215,6 @@ MempoolService.prototype._getAddressOperations = function(tx, reverse) {
|
|||||||
|
|
||||||
return ops;
|
return ops;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
MempoolService.prototype._onTransaction = function(tx) {
|
MempoolService.prototype._onTransaction = function(tx) {
|
||||||
|
|||||||
@ -404,8 +404,8 @@ TransactionService.prototype.onReorg = function(args, callback) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// remove all the spent index information
|
// remove all the spent index information
|
||||||
for(j = 0; j < tx.inputs.length; j++) {
|
for(var k = 0; k < tx.inputs.length; k++) {
|
||||||
var input = tx.inputs[j];
|
var input = tx.inputs[k];
|
||||||
removalOps.push({
|
removalOps.push({
|
||||||
type: 'del',
|
type: 'del',
|
||||||
key: self._encoding.encodeSpentKey(input.prevout.txid(), input.prevout.index)
|
key: self._encoding.encodeSpentKey(input.prevout.txid(), input.prevout.index)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user