Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions packages/libs/chainwebjs/src/headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export async function recentHeaders(
host: string,
): Promise<IBlockHeader[]> {
const cut = await currentCut(network, host);
const start = cut.hashes['0'].height - depth - n + 1;
const end = cut.hashes['0'].height - depth;
const start = cut.hashes[`${chainId}`].height - depth - n + 1;
const end = cut.hashes[`${chainId}`].height - depth;
const upper = cut.hashes[`${chainId}`].hash;

return branch(chainId, [upper], [], start, end, n, 'json', network, host);
Expand Down
3 changes: 3 additions & 0 deletions packages/libs/chainwebjs/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ const localConfig = defineConfig({
branches: 87.5,
statements: 86.31,
},
exclude: [
'**/types.ts',
],
},
},
});
Expand Down
Loading