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

New health #175

Merged
merged 3 commits into from
Jun 3, 2019
Merged

New health #175

merged 3 commits into from
Jun 3, 2019

Conversation

Ivshti
Copy link
Member

@Ivshti Ivshti commented Jun 2, 2019

The previous health function was independent of the channel deposit. This meant that, when channels have a few events (impressions), discrepancies can easily happen; e.g. 2 impressions for the follower but 1 by the leader will cause an unhealthy status

This new updated function calculates a acceptableDifference, which is channel.deposit * (1-HEALTH_THRESHOLD); for example, a threshold of 950 promilles and a deposit of 100 will mean that 5 is the acceptable difference

then, we just check if the difference is GTE the acceptable difference

Copy link
Member

@elpiel elpiel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@Ivshti Ivshti merged commit 84e258d into master Jun 3, 2019
@Ivshti Ivshti deleted the new-health branch July 5, 2019 15:02
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

Successfully merging this pull request may close these issues.

None yet

3 participants