mempool: minor.

This commit is contained in:
Christopher Jeffrey 2017-03-05 16:12:52 -08:00
parent c38a4fc031
commit bf4c890b88
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -196,14 +196,15 @@ Mempool.prototype.addBlock = co(function* addBlock(block, txs) {
*/
Mempool.prototype._addBlock = co(function* addBlock(block, txs) {
var entries = [];
var i, entry, tx, hash;
var i, entries, entry, tx, hash;
if (this.totalTX === 0) {
this.tip = block.hash;
return;
}
entries = [];
for (i = txs.length - 1; i >= 1; i--) {
tx = txs[i];
hash = tx.hash('hex');