platform icon indicating copy to clipboard operation
platform copied to clipboard

feat(platform)!: total credits on platform query and fix for reward distribution

Open QuantumExplorer opened this issue 1 year ago • 0 comments

Issue being fixed or feature implemented

While we could ask Platform for the total number of credits in Platform, this was not taking into consideration promised rewards due to the core block height increase.

What was done?

Created a new query that will get the total number of credits in Platform, but also the current unpaid epoch and it's start block height. With all this information we can calculate the total credits in Platform with rewards taken into account. Something that should match what Core has (except if there are identity funding state transactions that have not been used).

How Has This Been Tested?

Added a few tests to make sure this was working.

Breaking Changes

This is not a breaking change.

Checklist:

  • [X] I have performed a self-review of my own code
  • [X] I have commented my code, particularly in hard-to-understand areas
  • [X] I have added or updated relevant unit/integration/functional/e2e tests
  • [X] I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • [X] I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • [ ] I have assigned this pull request to a milestone

QuantumExplorer avatar Aug 02 '24 03:08 QuantumExplorer