Fix new block mempool deletion race condition

This commit is contained in:
Mononaut
2023-04-07 09:41:25 +09:00
parent 2c04a48646
commit b673fdbcd1
6 changed files with 22 additions and 29 deletions

View File

@@ -178,7 +178,7 @@ class MempoolBlocks {
// prepare a stripped down version of the mempool with only the minimum necessary data
// to reduce the overhead of passing this data to the worker thread
const strippedMempool: { [txid: string]: ThreadTransaction } = {};
Object.values(newMempool).filter(tx => !tx.deleteAfter).forEach(entry => {
Object.values(newMempool).forEach(entry => {
strippedMempool[entry.txid] = {
txid: entry.txid,
fee: entry.fee,