Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mempool's removeBlock doesn't add TXs back if mempool is empty #915

Open
mafintosh opened this issue Nov 27, 2019 · 1 comment · May be fixed by #917
Open

Mempool's removeBlock doesn't add TXs back if mempool is empty #915

mafintosh opened this issue Nov 27, 2019 · 1 comment · May be fixed by #917

Comments

@mafintosh
Copy link

This line seems like a faulty copy/paste:

async _removeBlock(block, txs) {
if (this.map.size === 0) {
this.tip = block.prevBlock;
return;
}

@pinheadmz
Copy link
Member

pinheadmz commented Nov 30, 2019

Ok I understand this now - it's not a mistake. This guard and the checks in mempool._handleReorg() are in place to make TXs from disconnected blocks reentering the mempool much simpler. The rules for BIP68 (CSV) gets really complicated when TXs re-enter the mempool and I think bcoin handles this in a compatible (if not incomplete) way compared to Bitcoin Core. This is going to a be a bigger issue for Handshake, and I'll open a new issue there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants