mempool: minor.

This commit is contained in:
Christopher Jeffrey 2017-02-28 13:21:53 -08:00
parent 7bfe5cfd08
commit 6dcbb93802
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

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