mempool: minor.
This commit is contained in:
parent
3d4b0d9a61
commit
8f8cf4fca6
@ -79,7 +79,6 @@ function Mempool(options) {
|
|||||||
|
|
||||||
this.size = 0;
|
this.size = 0;
|
||||||
this.totalOrphans = 0;
|
this.totalOrphans = 0;
|
||||||
this.totalSpent = 0;
|
|
||||||
this.totalTX = 0;
|
this.totalTX = 0;
|
||||||
|
|
||||||
this.waiting = {};
|
this.waiting = {};
|
||||||
@ -120,7 +119,7 @@ utils.inherits(Mempool, AsyncObject);
|
|||||||
|
|
||||||
Mempool.prototype._open = function open(callback) {
|
Mempool.prototype._open = function open(callback) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var size = (self.maxSize / 1024).toFixed(2);
|
var size = (this.maxSize / 1024).toFixed(2);
|
||||||
this.chain.open(function(err) {
|
this.chain.open(function(err) {
|
||||||
if (err)
|
if (err)
|
||||||
return callback(err);
|
return callback(err);
|
||||||
@ -137,7 +136,7 @@ Mempool.prototype._open = function open(callback) {
|
|||||||
* @param {Function} callback
|
* @param {Function} callback
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Mempool.prototype._close = function destroy(callback) {
|
Mempool.prototype._close = function close(callback) {
|
||||||
callback();
|
callback();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1405,7 +1404,6 @@ Mempool.prototype.trackEntry = function trackEntry(entry) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.totalSpent += tx.inputs.length;
|
|
||||||
this.size += this.memUsage(tx);
|
this.size += this.memUsage(tx);
|
||||||
this.totalTX++;
|
this.totalTX++;
|
||||||
};
|
};
|
||||||
@ -1452,7 +1450,6 @@ Mempool.prototype.untrackEntry = function untrackEntry(entry) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.totalSpent -= tx.inputs.length;
|
|
||||||
this.size -= this.memUsage(tx);
|
this.size -= this.memUsage(tx);
|
||||||
this.totalTX--;
|
this.totalTX--;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user