mempool: minor.

This commit is contained in:
Christopher Jeffrey 2016-08-22 22:19:31 -07:00
parent 3d4b0d9a61
commit 8f8cf4fca6
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -79,7 +79,6 @@ function Mempool(options) {
this.size = 0;
this.totalOrphans = 0;
this.totalSpent = 0;
this.totalTX = 0;
this.waiting = {};
@ -120,7 +119,7 @@ utils.inherits(Mempool, AsyncObject);
Mempool.prototype._open = function open(callback) {
var self = this;
var size = (self.maxSize / 1024).toFixed(2);
var size = (this.maxSize / 1024).toFixed(2);
this.chain.open(function(err) {
if (err)
return callback(err);
@ -137,7 +136,7 @@ Mempool.prototype._open = function open(callback) {
* @param {Function} callback
*/
Mempool.prototype._close = function destroy(callback) {
Mempool.prototype._close = function close(callback) {
callback();
};
@ -1405,7 +1404,6 @@ Mempool.prototype.trackEntry = function trackEntry(entry) {
}
}
this.totalSpent += tx.inputs.length;
this.size += this.memUsage(tx);
this.totalTX++;
};
@ -1452,7 +1450,6 @@ Mempool.prototype.untrackEntry = function untrackEntry(entry) {
}
}
this.totalSpent -= tx.inputs.length;
this.size -= this.memUsage(tx);
this.totalTX--;
};