Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 66080cd

Browse files
author
Andres Adjimann
committed
test: add a specific test for eth_getBlockTransactionCountByHash
1 parent 63ce2a9 commit 66080cd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/chains/ethereum/ethereum/tests/forking/block.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,12 @@ describe("forking", function () {
8484
const block = await provider.send("eth_getBlockByNumber", ["0x0", true]);
8585
assert.deepStrictEqual(block, block0);
8686
});
87+
88+
it("should get TransactionCountByHash from the original chain", async () => {
89+
const block = await provider.send("eth_getBlockByNumber", ["0xB443", true]);
90+
const blockTransactionCountByHash = await provider.send("eth_getBlockTransactionCountByHash", [block.hash]);
91+
assert.deepStrictEqual(block.transactions.length, parseInt(blockTransactionCountByHash));
92+
});
93+
8794
});
8895
});

0 commit comments

Comments
 (0)