Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/rpc/src/eth/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ where
.map_err(|err| internal_err(format!("{:?}", err)))?
{
Some(hash) => hash,
_ => return Ok(Vec::new()),
_ => return Err(crate::err(-32000, "unknown block", None)),
};
let schema = fc_storage::onchain_storage_schema(client.as_ref(), substrate_hash);

Expand Down
10 changes: 10 additions & 0 deletions ts-tests/tests/test-log-filtering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,14 @@ describeWithFrontier("Frontier RPC (Log filtering)", (context) => {
expect(request.result.length).to.be.eq(0);
}
});

step("EthApi::getLogs - should return `unknown block`.", async function () {
let request = await customRequest(context.web3, "eth_getLogs", [
{
blockHash: "0x1234000000000000000000000000000000000000000000000000000000000000",
},
]);
expect(request.error.message).to.be.equal("unknown block");
expect(request.error.code).to.be.equal(-32000);
});
});