Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fix wrong cache key on eth_getBlockByHash #3232

Merged
merged 2 commits into from
Nov 7, 2024
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 packages/relay/src/lib/eth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2089,7 +2089,7 @@ export class EthImpl implements Eth {
);
return receipt;
} else {
const effectiveGas = await this.getCurrentGasPriceForBlock(receiptResponse.blockHash, requestDetails);
const effectiveGas = await this.getCurrentGasPriceForBlock(receiptResponse.block_hash, requestDetails);
// support stricter go-eth client which requires the transaction hash property on logs
const logs = receiptResponse.logs.map((log) => {
return new Log({
Expand Down
3 changes: 3 additions & 0 deletions packages/relay/tests/lib/mirrorNodeClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,9 @@ describe('MirrorNodeClient', async function () {
expect(result.to).equal(detailedContractResult.to);
expect(result.v).equal(detailedContractResult.v);
expect(result.transaction_index).equal(detailedContractResult.transaction_index);
expect(result.block_gas_used).equal(detailedContractResult.block_gas_used);
expect(result.block_number).equal(detailedContractResult.block_number);
expect(result.block_hash).equal(detailedContractResult.block_hash);
expect(mock.history.get.length).to.eq(1); // is called once
});

Expand Down
Loading