Skip to content

Commit

Permalink
added test to fetch genesis by hash (#209)
Browse files Browse the repository at this point in the history
* added test to fetch genesis by hash

* add test as skipped
  • Loading branch information
joelamouche authored Feb 3, 2021
1 parent e018d42 commit 7890e51
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion moonbeam-types-bundle/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions tests/tests/test-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,27 @@ describeWithMoonbeam("Moonbeam RPC (Block)", `simple-specs.json`, (context) => {
expect(block.timestamp).to.be.a("number");
});

// TODO: unskip this when https://github.com/paritytech/frontier/pull/279 is merged
it.skip("fetch genesis block by hash", async function () {
//fetch block again using hash
const block = await context.web3.eth.getBlock(0);
const blockByHash = await context.web3.eth.getBlock(block.hash);
console.log("blockbyhash", blockByHash);
expect(blockByHash).to.include({
author: "0x0000000000000000000000000000000000000000",
difficulty: "0",
extraData: "0x",
gasLimit: 4294967295,
gasUsed: 0,
logsBloom: `0x${"0".repeat(512)}`,
number: 0,
receiptsRoot: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
totalDifficulty: null,
transactionsRoot: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
});
});

let firstBlockCreated = false;
step("should be at block 1 after block production", async function () {
this.timeout(15000);
Expand Down

0 comments on commit 7890e51

Please sign in to comment.