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

🐛 add quorum for requesting balance #704

Conversation

tenmoves
Copy link
Contributor

Description

When requesting balance we used to get the value from the first node, we need to do a quorum call and use the max value form the balance.

Fixes #692

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

This is tested in get_balance/1 tests in test/archethic_test.exs, I modified the tests to have multiple nodes with multiple balance values and different tokens with different values.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@tenmoves tenmoves self-assigned this Nov 18, 2022
@tenmoves tenmoves added the bug Something isn't working label Nov 18, 2022
@tenmoves tenmoves added feature New feature request P2P Involve P2P networking and removed bug Something isn't working labels Nov 18, 2022
@samuelmanzanera samuelmanzanera merged commit ce981d4 into archethic-foundation:develop Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request P2P Involve P2P networking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add quorum to request balance
3 participants