Skip to content

Commit 11ab77a

Browse files
ebadierenatanasow
andauthored
feat: fix wrong cache key on eth_getBlockByHash (#3232) (#3233)
* chore: fix wrong passed param * chore: modify existing test to handle block_ properties as well --------- Signed-off-by: nikolay <n.atanasow94@gmail.com> Signed-off-by: Eric Badiere <ebadiere@gmail.com> Co-authored-by: Nikolay Atanasow <n.atanasow94@gmail.com>
1 parent 74ee9ec commit 11ab77a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/relay/src/lib/eth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2089,7 +2089,7 @@ export class EthImpl implements Eth {
20892089
);
20902090
return receipt;
20912091
} else {
2092-
const effectiveGas = await this.getCurrentGasPriceForBlock(receiptResponse.blockHash, requestDetails);
2092+
const effectiveGas = await this.getCurrentGasPriceForBlock(receiptResponse.block_hash, requestDetails);
20932093
// support stricter go-eth client which requires the transaction hash property on logs
20942094
const logs = receiptResponse.logs.map((log) => {
20952095
return new Log({

packages/relay/tests/lib/mirrorNodeClient.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,9 @@ describe('MirrorNodeClient', async function () {
574574
expect(result.to).equal(detailedContractResult.to);
575575
expect(result.v).equal(detailedContractResult.v);
576576
expect(result.transaction_index).equal(detailedContractResult.transaction_index);
577+
expect(result.block_gas_used).equal(detailedContractResult.block_gas_used);
578+
expect(result.block_number).equal(detailedContractResult.block_number);
579+
expect(result.block_hash).equal(detailedContractResult.block_hash);
577580
expect(mock.history.get.length).to.eq(1); // is called once
578581
});
579582

0 commit comments

Comments
 (0)