Skip to content

Commit

Permalink
cleanup nits
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikGul committed Dec 21, 2023
1 parent 8325a98 commit d987d1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/controllers/blocks/BlocksController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,9 @@ export default class BlocksController extends AbstractController<BlocksService>

// HistoricApi to fetch any historic information that doesnt include the current runtime
const historicApi = await this.api.at(hash);
console.time('BLOCK');
const block = await this.service.fetchBlock(hash, historicApi, options);
console.timeEnd('BLOCK');

// We set the last param to true because we haven't queried the finalizedHead
BlocksController.sanitizedSend(res, block);
BlocksController.sanitizedSend(res, await this.service.fetchBlock(hash, historicApi, options));
};

/**
Expand Down
3 changes: 3 additions & 0 deletions src/services/blocks/BlocksService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ export class BlocksService extends AbstractService {
}

const previousBlockHash = await this.fetchPreviousBlockHash(number);
/**
* Fee calculation logic. This runs the the extrinsics concurrently.
*/
const pQueue = new PromiseQueue(4);
const feeTasks = [];
for (let idx = 0; idx < block.extrinsics.length; ++idx) {
Expand Down

0 comments on commit d987d1b

Please sign in to comment.