mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 06:47:52 +01:00
Fix getSimilarity error on empty mempool
This commit is contained in:
parent
25aacb5046
commit
b5c2073414
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue