File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ type Config struct {
7272 RPCNumParallelCalls uint64 `env:"RPC_NUM_PARALLEL_CALLS" envDefault:"20"`
7373 RPCBatchSize uint64 `env:"RPC_BATCH_SIZE" envDefault:"10"`
7474 RPCBatchMaxMemoryUsageMB uint64 `env:"RPC_BATCH_MAX_MEMORY_USAGE_MB" envDefault:"32"`
75+ RPCDisableBlockReceipts bool `env:"RPC_DISABLE_BLOCK_RECEIPTS" envDefault:"false"`
7576 ParquetMaxFileSizeMB int64 `env:"PARQUET_MAX_FILE_SIZE_MB" envDefault:"512"`
7677 InsightServiceUrl string `env:"INSIGHT_SERVICE_URL" envDefault:"https://insight.thirdweb.com"`
7778 InsightServiceApiKey string `env:"INSIGHT_SERVICE_API_KEY"`
Original file line number Diff line number Diff line change @@ -181,6 +181,11 @@ func (rpc *Client) checkGetBlockByNumberSupport() error {
181181}
182182
183183func (rpc * Client ) checkGetBlockReceiptsSupport () error {
184+ if config .Cfg .RPCDisableBlockReceipts {
185+ rpc .supportsBlockReceipts = false
186+ log .Warn ().Msg ("eth_getBlockReceipts method disabled by config" )
187+ return nil
188+ }
184189 // Always probe to see if the method is supported
185190 var getBlockReceiptsResult interface {}
186191 receiptsErr := rpc .RPCClient .Call (& getBlockReceiptsResult , "eth_getBlockReceipts" , "latest" )
You can’t perform that action at this time.
0 commit comments