Corrected mempool removal logic.
This commit is contained in:
parent
7662bf1bf5
commit
d42e29ecbe
@ -102,8 +102,10 @@ TransactionService.prototype._updateMempool = function(tx, action) {
|
||||
TransactionService.prototype.blockHandler = function(block, connectBlock, callback) {
|
||||
var self = this;
|
||||
var action = 'put';
|
||||
reverseAction = 'del';
|
||||
if (!connectBlock) {
|
||||
action = 'del';
|
||||
reverseAction = 'put';
|
||||
}
|
||||
|
||||
var operations = [];
|
||||
@ -121,7 +123,7 @@ TransactionService.prototype.blockHandler = function(block, connectBlock, callba
|
||||
});
|
||||
}, function(next) {
|
||||
async.eachSeries(block.transactions, function(tx, next) {
|
||||
self._updateMempool(tx, action);
|
||||
self._updateMempool(tx, reverseAction);
|
||||
tx.__timestamp = block.__timestamp;
|
||||
tx.__height = block.__height;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user