mempool: make jshint happy.
This commit is contained in:
parent
4e7d0af456
commit
49d41f17e4
@ -151,7 +151,7 @@ Mempool.prototype._close = function close() {
|
|||||||
Mempool.prototype.addBlock = co(function* addBlock(block) {
|
Mempool.prototype.addBlock = co(function* addBlock(block) {
|
||||||
var unlock = yield this.locker.lock();
|
var unlock = yield this.locker.lock();
|
||||||
try {
|
try {
|
||||||
return yield this._addBlock(block);
|
return this._addBlock(block);
|
||||||
} finally {
|
} finally {
|
||||||
unlock();
|
unlock();
|
||||||
}
|
}
|
||||||
@ -165,7 +165,7 @@ Mempool.prototype.addBlock = co(function* addBlock(block) {
|
|||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Mempool.prototype._addBlock = co(function* addBlock(block) {
|
Mempool.prototype._addBlock = function addBlock(block) {
|
||||||
var entries = [];
|
var entries = [];
|
||||||
var i, entry, tx, hash;
|
var i, entry, tx, hash;
|
||||||
|
|
||||||
@ -198,9 +198,7 @@ Mempool.prototype._addBlock = co(function* addBlock(block) {
|
|||||||
// We need to reset the rejects filter periodically.
|
// We need to reset the rejects filter periodically.
|
||||||
// There may be a locktime in a TX that is now valid.
|
// There may be a locktime in a TX that is now valid.
|
||||||
this.rejects.reset();
|
this.rejects.reset();
|
||||||
|
};
|
||||||
yield co.wait();
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify the mempool that a block has been disconnected
|
* 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) {
|
Mempool.prototype.removeBlock = co(function* removeBlock(block) {
|
||||||
var unlock = yield this.locker.lock();
|
var unlock = yield this.locker.lock();
|
||||||
try {
|
try {
|
||||||
return yield this._removeBlock(block);
|
return this._removeBlock(block);
|
||||||
} finally {
|
} finally {
|
||||||
unlock();
|
unlock();
|
||||||
}
|
}
|
||||||
@ -226,7 +224,7 @@ Mempool.prototype.removeBlock = co(function* removeBlock(block) {
|
|||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Mempool.prototype._removeBlock = co(function* removeBlock(block) {
|
Mempool.prototype._removeBlock = function removeBlock(block) {
|
||||||
var i, entry, tx, hash;
|
var i, entry, tx, hash;
|
||||||
|
|
||||||
for (i = 0; i < block.txs.length; i++) {
|
for (i = 0; i < block.txs.length; i++) {
|
||||||
@ -250,7 +248,7 @@ Mempool.prototype._removeBlock = co(function* removeBlock(block) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.rejects.reset();
|
this.rejects.reset();
|
||||||
});
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ensure the size of the mempool stays below 300mb.
|
* Ensure the size of the mempool stays below 300mb.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user