mirror of
https://github.com/mempool/mempool.git
synced 2024-11-20 02:11:49 +01:00
Fix getSimilarity error on empty mempool
This commit is contained in:
parent
25aacb5046
commit
b5c2073414
@ -469,8 +469,10 @@ class WebsocketHandler {
|
||||
}
|
||||
} else if (block.extras) {
|
||||
const mBlocks = mempoolBlocks.getMempoolBlocksWithTransactions();
|
||||
if (mBlocks?.length && mBlocks[0].transactions) {
|
||||
block.extras.similarity = Common.getSimilarity(mBlocks[0], transactions);
|
||||
}
|
||||
}
|
||||
|
||||
const removed: string[] = [];
|
||||
// Update mempool to remove transactions included in the new block
|
||||
|
Loading…
Reference in New Issue
Block a user