Commit 816b75a8 authored by Mael Regnery's avatar Mael Regnery Committed by GitHub

fix: use eth_getBlockReceipts for Infura RPC kind (#12969)

* fix: use eth_getBlockReceipts for Infura RPC kind

* fix infura test
parent 418f0cca
...@@ -329,8 +329,7 @@ func AvailableReceiptsFetchingMethods(kind RPCProviderKind) ReceiptsFetchingMeth ...@@ -329,8 +329,7 @@ func AvailableReceiptsFetchingMethods(kind RPCProviderKind) ReceiptsFetchingMeth
case RPCKindQuickNode: case RPCKindQuickNode:
return DebugGetRawReceipts | EthGetBlockReceipts | EthGetTransactionReceiptBatch return DebugGetRawReceipts | EthGetBlockReceipts | EthGetTransactionReceiptBatch
case RPCKindInfura: case RPCKindInfura:
// Infura is big, but sadly does not support more optimized receipts fetching methods (yet?) return EthGetBlockReceipts | EthGetTransactionReceiptBatch
return EthGetTransactionReceiptBatch
case RPCKindParity: case RPCKindParity:
return ParityGetBlockReceipts | EthGetTransactionReceiptBatch return ParityGetBlockReceipts | EthGetTransactionReceiptBatch
case RPCKindNethermind: case RPCKindNethermind:
......
...@@ -283,7 +283,7 @@ func TestEthClient_FetchReceipts(t *testing.T) { ...@@ -283,7 +283,7 @@ func TestEthClient_FetchReceipts(t *testing.T) {
{ {
name: "infura", name: "infura",
providerKind: RPCKindInfura, providerKind: RPCKindInfura,
setup: fallbackCase(4, EthGetTransactionReceiptBatch), setup: fallbackCase(4, EthGetBlockReceipts, EthGetTransactionReceiptBatch),
}, },
{ {
name: "nethermind", name: "nethermind",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment