diff --git a/lib/mempool/mempool.js b/lib/mempool/mempool.js index 17567770..2e52c124 100644 --- a/lib/mempool/mempool.js +++ b/lib/mempool/mempool.js @@ -83,7 +83,7 @@ function Mempool(options) { this.totalTX = 0; this.freeCount = 0; this.lastTime = 0; - this.lastUpdate = 0; + this.lastFlush = 0; this.waiting = {}; this.orphans = {}; @@ -678,9 +678,9 @@ Mempool.prototype._addTX = co(function* _addTX(tx) { throw err; } - if (util.now() - this.lastUpdate > 10) { + if (util.now() - this.lastFlush > 10) { yield this.cache.flush(); - this.lastUpdate = util.now(); + this.lastFlush = util.now(); } return missing;