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: cabinet comparitor #172

Merged
merged 2 commits into from
Oct 10, 2023
Merged

fix: cabinet comparitor #172

merged 2 commits into from
Oct 10, 2023

Conversation

mfw78
Copy link
Contributor

@mfw78 mfw78 commented Oct 5, 2023

Problem
Previously, the guard for an epoch of zero wasn't triggering as the return value of the cabinet was of type BigNumber and the number comparison to 0 would never trigger due to not being of type number.

Solution
This PR correctly handles the bignumber to number marshalling and guards against out-of-range conditions. As there is an interface requirement for the cabinet to be set if the order is of start mining time type, any order that doesn't meet this is requirement is automatically removed from the watch-tower.

@mfw78 mfw78 added the bug Something isn't working label Oct 5, 2023
@mfw78 mfw78 self-assigned this Oct 5, 2023
@coveralls
Copy link
Collaborator

coveralls commented Oct 5, 2023

Coverage Status

coverage: 79.051% (+0.6%) from 78.445% when pulling 9445824 on enforce-interface into 8652d2f on main.

Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

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

The PR looks great, but I think we should include a unit test to repoduce the cabinete overflow case

@anxolin anxolin merged commit dde6143 into main Oct 10, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Oct 10, 2023
@alfetopito alfetopito deleted the enforce-interface branch October 10, 2023 15:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants