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,7 +469,9 @@ class WebsocketHandler {
|
||||
}
|
||||
} else if (block.extras) {
|
||||
const mBlocks = mempoolBlocks.getMempoolBlocksWithTransactions();
|
||||
block.extras.similarity = Common.getSimilarity(mBlocks[0], transactions);
|
||||
if (mBlocks?.length && mBlocks[0].transactions) {
|
||||
block.extras.similarity = Common.getSimilarity(mBlocks[0], transactions);
|
||||
}
|
||||
}
|
||||
|
||||
const removed: string[] = [];
|
||||
|
Loading…
Reference in New Issue
Block a user