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

Provide timeout as a config value #37

Open
roynalnaruto opened this issue Jun 20, 2019 · 1 comment
Open

Provide timeout as a config value #37

roynalnaruto opened this issue Jun 20, 2019 · 1 comment

Comments

@roynalnaruto
Copy link

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?

@hswick
Copy link
Owner

hswick commented Jun 20, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants