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

Fix home gas price fallback value usage in monitor #254

Closed
wants to merge 1 commit into from

Conversation

patitonar
Copy link
Contributor

Closes #237

If COMMON_HOME_GAS_PRICE_FALLBACK is set to 0 the leftTx attribute will be set to a very big number as specified in this change #142 (comment) , so then results.homeOk will be true when validators have 0 balance as in xDai Chain.

Most of the logic was in place, this PR only fixes the precedence order of the gas price parameters used in the calculation

@patitonar patitonar requested a review from akolotov December 27, 2019 19:41
@patitonar patitonar self-assigned this Dec 27, 2019
Copy link
Collaborator

@akolotov akolotov left a comment

Choose a reason for hiding this comment

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

@patitonar I think the original issue was against the fact that we don't need to monitor the validator's balance on the xDai chain at all. These accounts are whitelisted in the the consensus contracts that's why they could send transactions with the zero gas price.

In order to disable the validator's balance check let's reuse MONITOR_VALIDATOR_*_TX_LIMIT variables. If the variable is set to 0 or undefined, the check will be disabled and results.homeOk/results.foreignOk will be always true in this case.

@patitonar
Copy link
Contributor Author

Thanks for the explanation! Closed in favor of #259

@patitonar patitonar closed this Dec 30, 2019
@patitonar patitonar deleted the 237-home-txleft branch December 30, 2019 14:36
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.

2 participants