mempool: make jshint happy.

This commit is contained in:
Christopher Jeffrey 2016-10-05 19:58:08 -07:00
parent 4e7d0af456
commit 49d41f17e4
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -151,7 +151,7 @@ Mempool.prototype._close = function close() {
Mempool.prototype.addBlock = co(function* addBlock(block) {
var unlock = yield this.locker.lock();
try {
return yield this._addBlock(block);
return this._addBlock(block);
} finally {
unlock();
}
@ -165,7 +165,7 @@ Mempool.prototype.addBlock = co(function* addBlock(block) {
* @returns {Promise}
*/
Mempool.prototype._addBlock = co(function* addBlock(block) {
Mempool.prototype._addBlock = function addBlock(block) {
var entries = [];
var i, entry, tx, hash;
@ -198,9 +198,7 @@ Mempool.prototype._addBlock = co(function* addBlock(block) {
// We need to reset the rejects filter periodically.
// There may be a locktime in a TX that is now valid.
this.rejects.reset();
yield co.wait();
});
};
/**
* Notify the mempool that a block has been disconnected
@ -212,7 +210,7 @@ Mempool.prototype._addBlock = co(function* addBlock(block) {
Mempool.prototype.removeBlock = co(function* removeBlock(block) {
var unlock = yield this.locker.lock();
try {
return yield this._removeBlock(block);
return this._removeBlock(block);
} finally {
unlock();
}
@ -226,7 +224,7 @@ Mempool.prototype.removeBlock = co(function* removeBlock(block) {
* @returns {Promise}
*/
Mempool.prototype._removeBlock = co(function* removeBlock(block) {
Mempool.prototype._removeBlock = function removeBlock(block) {
var i, entry, tx, hash;
for (i = 0; i < block.txs.length; i++) {
@ -250,7 +248,7 @@ Mempool.prototype._removeBlock = co(function* removeBlock(block) {
}
this.rejects.reset();
});
};
/**
* Ensure the size of the mempool stays below 300mb.