exw3 icon indicating copy to clipboard operation
exw3 copied to clipboard

Provide timeout as a config value

Open roynalnaruto opened this issue 5 years ago • 1 comments

In the following function

@spec call(atom(), atom(), list()) :: {:ok, any()}
@doc "Use a Contract's method with an eth_call"
def call(contract_name, method_name, args \\ []) do
  GenServer.call(ContractManager, {:call, {contract_name, method_name, args}})
end

the GenServer request times out quite a few times while accessing data on the mainnet (because the default timeout is 5 seconds).

The timeout of Ethereumex.HttpClient can be set to :infinity, but the request times out at exw3.

Will it be helpful in allowing setting the GenServer timeout as a config value?

roynalnaruto avatar Jun 20 '19 01:06 roynalnaruto

As long as the config param is optional it sounds okay to me.

hswick avatar Jun 20 '19 03:06 hswick