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

Improve the rounding off logic in Balance class #794

Merged
merged 10 commits into from
Mar 1, 2023

Conversation

aniketsingh03
Copy link

@aniketsingh03 aniketsingh03 commented Feb 22, 2023

Changes

  • This PR improves the logic in misc.go for improved rounding off when converting floats to ints

Fixes

Tests

Tasks to complete before merging PR:

  • Ensure system tests are passing. If not Run them manually to check for any regressions 📋
  • Do any new system tests need added to test this change? do any existing system tests need updated? If so create a PR at 0chain/system_test
  • Merge your system tests PR to master AFTER merging this PR

Associated PRs (Link as appropriate):

core/common/misc.go Outdated Show resolved Hide resolved
Copy link
Member

@dabasov dabasov left a comment

Choose a reason for hiding this comment

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

lgtm

@aniketsingh03 aniketsingh03 force-pushed the fix-rounding-off-for-balance branch from a574d53 to 4404f4d Compare February 23, 2023 14:56
@service-0chain
Copy link
Contributor

Manual system tests [failure] with the following config

config value
tests skipped FALSE
system-tests master
gosdk fix-rounding-off-for-balance
zboxcli fix-rounding-off-for-balance
zwalletcli fix-rounding-off-for-balance
0chain staging
blobber staging
authorizer staging
0box staging
0block staging
0dns staging
explorer staging
0proxy staging
0search staging

Copy link
Member

@peterlimg peterlimg left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@cnlangzi cnlangzi left a comment

Choose a reason for hiding this comment

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

LGTM

@service-0chain
Copy link
Contributor

Manual system tests [success] with the following config

config value
tests skipped TRUE
system-tests master
gosdk fix-rounding-off-for-balance
zboxcli staging
zwalletcli staging
0chain staging
blobber staging
authorizer staging
0box staging
0block staging
0dns staging
explorer staging
0proxy staging
0search staging

@peterlimg peterlimg merged commit af01e35 into staging Mar 1, 2023
@peterlimg peterlimg deleted the fix-rounding-off-for-balance branch March 1, 2023 06:53
peterlimg added a commit to 0chain/zboxcli that referenced this pull request Mar 1, 2023
Improve the rounding off logic in Balance class (for changes in 0chain/gosdk#794)
Kishan-Dhakan added a commit to 0chain/zwalletcli that referenced this pull request Mar 1, 2023
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.

6 participants