Skip to content
This repository was archived by the owner on Dec 30, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/rpc/service/bc/getBlocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const { BcBlock } = require('../../../protos/core_pb'); /**
const { GetBlocksResponse, GetBlocksRequests } = require('../../../protos/bc_pb');

const rovers = require('../../../rover/manager').rovers;
const BC_SUPER_COLLIDER = process.env.BC_SUPER_COLLIDER ? process.env.BC_SUPER_COLLIDER.toLowerCase() : 'bc';

function reorganizeBlocks(blocks) {
if (!blocks) {
Expand Down Expand Up @@ -92,7 +93,7 @@ function getBlocks(context, call, callback) {
}

const promises = keys.map(key => {
return context.server.engine.persistence.getBlocksByHeight(key).then(res => {
return context.server.engine.persistence.getBlocksByHeight(key, BC_SUPER_COLLIDER, { asHeaders: false, cached: false }).then(res => {
return res;
}).catch(err => {
return err;
Expand All @@ -109,4 +110,4 @@ function getBlocks(context, call, callback) {
context.logger.error(`Could not get block, reason: ${err}'`);
callback(err);
});
}
}