Skip to content

Commit

Permalink
eth_getLogs return expected error/message for unknown hash (#2350)
Browse files Browse the repository at this point in the history
* pin frontier `49dc9b4`

* add ts test

* editorconfig
  • Loading branch information
tgmichel authored Jun 14, 2023
1 parent a3e40a9 commit 79a1c1e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 22 deletions.
44 changes: 22 additions & 22 deletions Cargo.lock

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

9 changes: 9 additions & 0 deletions tests/tests/test-eth-rpc/test-eth-rpc-log-filtering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,13 @@ describeDevMoonbeamAllEthTxTypes("Ethereum RPC - Filtering non-matching logs", (
expect(request.result.length).to.be.eq(0);
}
});
it("EthApi::getLogs - should return `unknown block`.", async function () {
let request = await customWeb3Request(context.web3, "eth_getLogs", [
{
blockHash: "0x1234000000000000000000000000000000000000000000000000000000000000",
},
]);
expect(request.error.message).to.be.equal("unknown block");
expect(request.error.code).to.be.equal(-32000);
});
});

0 comments on commit 79a1c1e

Please sign in to comment.