MCPcopy Create free account
hub / github.com/subquery/subql / inBypassBlocks

Function inBypassBlocks

packages/node-core/src/utils/blocks.ts:49–55  ·  view source on GitHub ↗
(bypassBlocks: BypassBlocks, blockNum: number)

Source from the content-addressed store, hash-verified

47}
48
49function inBypassBlocks(bypassBlocks: BypassBlocks, blockNum: number): boolean {
50 return bypassBlocks.some((bypassEntry) => {
51 if (typeof bypassEntry === 'number') return bypassEntry === blockNum;
52 const [start, end] = bypassEntry.split('-').map((val) => parseInt(val.trim(), 10));
53 return blockNum >= start && blockNum <= end;
54 });
55}
56
57export function getHistoricalUnit(mode: HistoricalMode, header: Header): number {
58 if (mode === 'timestamp') {

Callers 1

filterBypassBlocksFunction · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected