From 57fb225b419a849863cc06b44898f48aece32f31 Mon Sep 17 00:00:00 2001 From: Galaxy <30950645+GalaxySciTech@users.noreply.github.com> Date: Thu, 11 Jan 2024 16:33:58 +0400 Subject: [PATCH] update --- test/FullCheckpoint.js | 8 ++++++++ test/LiteCheckpoint.js | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/test/FullCheckpoint.js b/test/FullCheckpoint.js index 85ed47b..d991070 100644 --- a/test/FullCheckpoint.js +++ b/test/FullCheckpoint.js @@ -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); diff --git a/test/LiteCheckpoint.js b/test/LiteCheckpoint.js index d01f25a..ece066e 100644 --- a/test/LiteCheckpoint.js +++ b/test/LiteCheckpoint.js @@ -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);