Improved block fetching performance.

This commit is contained in:
softsimon
2020-12-30 01:47:07 +07:00
parent 62c78f5b08
commit 5390629e41
3 changed files with 14 additions and 16 deletions

View File

@@ -77,7 +77,7 @@ class WebsocketHandler {
}
if (parsedMessage.action === 'init') {
const _blocks = blocks.getBlocks();
const _blocks = blocks.getBlocks().slice(-8);
if (!_blocks) {
return;
}
@@ -119,7 +119,7 @@ class WebsocketHandler {
getInitData(_blocks?: BlockExtended[]) {
if (!_blocks) {
_blocks = blocks.getBlocks();
_blocks = blocks.getBlocks().slice(-8);
}
return {
'mempoolInfo': memPool.getMempoolInfo(),