mirror of
https://github.com/mempool/mempool.git
synced 2025-04-10 04:49:19 +02:00
Send empty list of transactions if data isn't available yet
This commit is contained in:
parent
967a2a4461
commit
ebda00dc74
@ -116,12 +116,10 @@ class WebsocketHandler {
|
||||
const index = parsedMessage['track-mempool-block'];
|
||||
client['track-mempool-block'] = index;
|
||||
const mBlocksWithTransactions = mempoolBlocks.getMempoolBlocksWithTransactions();
|
||||
if (mBlocksWithTransactions[index]) {
|
||||
response['projected-block-transactions'] = {
|
||||
index: index,
|
||||
blockTransactions: mBlocksWithTransactions[index].transactions
|
||||
};
|
||||
}
|
||||
response['projected-block-transactions'] = {
|
||||
index: index,
|
||||
blockTransactions: mBlocksWithTransactions[index]?.transactions || [],
|
||||
};
|
||||
} else {
|
||||
client['track-mempool-block'] = null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user