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

Ensure that all operations emit correct amounts #33

Merged
merged 2 commits into from
Jun 9, 2022
Merged

Conversation

bisgardo
Copy link
Contributor

@bisgardo bisgardo commented Jun 7, 2022

Purpose

Ensure that all operations emit correct amounts such that the check:data check of the Rosetta CLI tool passes.

Changes

Many operation types had amount in their metadata instead of the operation itself. And for some odd reason, they had the fee as their amount which cancelled out the fee operation...

The following changes were included as part of this:

  • Add support for querying contract balance.
  • Cleanup: Only emit "fee" operation if it's amount is non-zero.

The changes have been picked from #24 to have a working version for P3, but also because the changes are mostly irrelevant for that PR.

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

bisgardo added 2 commits June 7, 2022 10:05
Many operation types had amount in their metadata instead of the operation itself. And for some odd reason, they had the fee as their amount which cancelled out the fee operation...

The following changes were included as part of this:

- Add support for querying contract balance.
- Cleanup: Only emit "fee" operation if it's amount is non-zero.
@bisgardo
Copy link
Contributor Author

bisgardo commented Jun 8, 2022

A full rosetta-cli check:data check against a mainnet node is currently running with no errors as of block 250000. With an estimated 1 week runtime for checking the rest of the chain, I think that's enough confidence to merge this for now.

@bisgardo bisgardo requested a review from abizjak June 8, 2022 06:50
@bisgardo bisgardo merged commit abb02b1 into main Jun 9, 2022
@bisgardo bisgardo deleted the fix-amounts branch June 9, 2022 09:49
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