mempool: fix orphan resolution edge case.
This commit is contained in:
parent
1aa78e2248
commit
ca4e938a75
@ -1562,7 +1562,16 @@ Mempool.prototype.handleOrphans = async function handleOrphans(parent) {
|
|||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(!missing || missing.length === 0);
|
// Can happen if an existing parent is
|
||||||
|
// evicted in the interim between fetching
|
||||||
|
// the non-present parents.
|
||||||
|
if (missing && missing.length > 0) {
|
||||||
|
this.logger.debug(
|
||||||
|
'Transaction %s was double-orphaned in mempool.',
|
||||||
|
tx.txid());
|
||||||
|
this.removeOrphan(tx.hash('hex'));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
this.logger.debug('Resolved orphan %s in mempool.', tx.txid());
|
this.logger.debug('Resolved orphan %s in mempool.', tx.txid());
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user