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

[Bug] Circular dependencies #108

Closed
Agupane opened this issue Jul 26, 2019 · 0 comments · Fixed by #126
Closed

[Bug] Circular dependencies #108

Agupane opened this issue Jul 26, 2019 · 0 comments · Fixed by #126
Assignees
Labels
backend bug Something isn't working

Comments

@Agupane
Copy link
Contributor

Agupane commented Jul 26, 2019

There is a circular dependency on the code, it's shown on a race condition, so it's not easy to reproduce it. It appears mostly on the check round change job.

The error is the following one:
image.png

Update 26/07:

We found a way to reproduce the error:

1- Use the branch test/circularDependencybug
2- See the code on /server/helpers/delegatorUtils.js line function getDelegatorSummary30RoundsRewards. Note that this function is different from the one on development (has promise all). The idea of using Promise.all() is to force the race condition to appear
3- Make an api call to the following api with a delegatorAddress with values on the db: http://localhost:4040/api/delegators/lastRewards/DELEGATORADDRESS
4- Repeat the api call until the error appears (it's a race condition, so could happen that it's not always appearing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working
Projects
None yet
1 participant