Send empty list of transactions if data isn't available yet
This commit is contained in:
parent
f1b5f5e52d
commit
4f571366a3
@ -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
|
||||
blockTransactions: mBlocksWithTransactions[index]?.transactions || [],
|
||||
};
|
||||
}
|
||||
} else {
|
||||
client['track-mempool-block'] = null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user