Remove unescessary data from the blocks-bulk API

This commit is contained in:
nymkappa committed 2023-02-25 14:22:12 +09:00
1 parent bdcf848209
commit dc48c486f2
2 files changed
+10 -1

No files matched your search

+9 -1
View File
@@ -783,10 +783,18 @@ class Blocks {
const blocks: any[] = [];
while (fromHeight <= toHeight) {
let block = await blocksRepository.$getBlockByHeight(fromHeight);
let block: any = await blocksRepository.$getBlockByHeight(fromHeight);
if (!block) {
block = await this.$indexBlock(fromHeight);
}
delete(block.hash);
delete(block.previous_block_hash);
delete(block.pool_name);
delete(block.pool_link);
delete(block.pool_addresses);
delete(block.pool_regexes);
blocks.push(block);
fromHeight++;
}