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

Start block parameter skipped when a watcher is started first time #87

Closed
akolotov opened this issue Sep 26, 2018 · 1 comment
Closed
Assignees

Comments

@akolotov
Copy link
Collaborator

Even if the parameters HOME_START_BLOCK and FOREIGN_START_BLOCK are configured in .env file they will not be used when the bridge is run first time since they are strings where as the code expects them to be integers:

https://github.com/poanetwork/bridge-nodejs/blob/8359556d9e9976a9388720d97de70e1bd7b35af8/src/watcher.js#L27

https://github.com/poanetwork/bridge-nodejs/blob/8359556d9e9976a9388720d97de70e1bd7b35af8/src/watcher.js#L106-L112

Scenario to reproduce:

  1. Deploy the bridge contracts in the erc-to-erc mode. Store bridgeDeploymentResults.json created after the deployment.
  2. Wait for few blocks produced
  3. Transfer tokens from Foreign network
  4. Wait for few blocks produced
  5. Configure .env of the bridge instance and points HOME_START_BLOCK and FOREIGN_START_BLOCK with values inserted in bridgeDeploymentResults.json after the contracts deployment.
  6. Run the bridge processes with empty Redis DB.
    As soon as the watcher-erc-affirmation-request process started following appeared in the terminal:
"Found 0 Transfer events"

and the corresponding requests to relay assets (transfer calls) does not handled by the bridge.

@akolotov
Copy link
Collaborator Author

Addressed in #103

@ghost ghost removed the review label Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants