Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Prevent timeout for getting Ethereum event logs #29

Open
shun-tak opened this issue Apr 26, 2020 · 0 comments
Open

Prevent timeout for getting Ethereum event logs #29

shun-tak opened this issue Apr 26, 2020 · 0 comments

Comments

@shun-tak
Copy link
Member

shun-tak commented Apr 26, 2020

The following code fails with a timeout when the number of blocks to get is too big

val filter = EthFilter(DefaultBlockParameter.valueOf(watcherState.fromBlockNumber),
DefaultBlockParameter.valueOf(watcherState.toBlockNumber),
watcherState.targetContractAddress)
val ethLogs = web3.ethGetLogs(filter).send()

Solution

  • be able to choose fromBlockNumber when starting StartEventWatchFlow
  • limit number of blocks to watch in one time
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants