mempool: fix reorg handling.

This commit is contained in:
Christopher Jeffrey 2016-10-05 19:49:03 -07:00
parent 1b489f42cd
commit 36a63694a0
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -239,9 +239,12 @@ Mempool.prototype._removeBlock = co(function* removeBlock(block) {
if (this.hasTX(hash))
continue;
tx = tx.clone();
tx.unsetBlock();
entry = MempoolEntry.fromTX(tx, block.height);
yield this._addUnchecked(entry);
this.trackEntry(entry);
this.emit('unconfirmed', tx, block);
}