Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
GalaxySciTech committed Jan 11, 2024
1 parent 9f57d13 commit 57fb225
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/FullCheckpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ describe("checkpoint", () => {
});

describe("test checkpoint real block data", () => {
it("should check defalut value", async () => {
const nonExistentBlock = await checkpoint.getHeader(
"0x3a9114857792f2a10b4d04ded4e29cb2371535ed749a7686aa2e9885c6007e25"
);

expect(nonExistentBlock.mainnetNum).to.eq(-1);
expect(nonExistentBlock.finalized).to.eq(false);
});
it("should verify roots", async () => {
const genesisHash = blockToHash(genesis);
const roots = await checkpoint.getRoots(genesisHash);
Expand Down
8 changes: 8 additions & 0 deletions test/LiteCheckpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ describe("lite checkpoint", () => {
await loadFixture(fixture));
});
describe("test lite checkpoint real block data", () => {
it("should check defalut value", async () => {
const nonExistentBlock = await liteCheckpoint.getHeader(
"0x3a9114857792f2a10b4d04ded4e29cb2371535ed749a7686aa2e9885c6007e25"
);

expect(nonExistentBlock.mainnetNum).to.eq(-1);
expect(nonExistentBlock.finalized).to.eq(false);
});
it("should receive a new header which has only the next and uncommitted", async () => {
await liteCheckpoint.receiveHeader([block451Encoded]);
const block2Hash = blockToHash(block451Encoded);
Expand Down

0 comments on commit 57fb225

Please sign in to comment.