-
Notifications
You must be signed in to change notification settings - Fork 162
Open
Description
Description
This is an issue in continuation of the changes made in the #1445 PR, to implement a performance improvement and test checking in the staking-info endpoint (claimed field).
Performance Improvement
In the staking-info endpoint, an improvement can be done regarding the calculation of claimed that can potentially increase the performance of the endpoint.
- Moving the OldCalls check outside the eras loop
Credits for this idea to @filvecchiato
Double Check Test Cases
It will be a good opportunity with the above improvement to also review existing tests & check if the below cases are covered:
- Case of
era < 518andchain = isKusama-> the era is considered asclaimed"automatically". - Case of
status = undefined-> which is when we do not have enough info to determine the status of the era. - Case where
staking.erasStakersOverview=null&erasStakers=0which can be implemented by mocking this requesthttp://127.0.0.1:8080/accounts/CmjHFdR59QAZMuyjDF5Sn4mwTgGbKMH2cErUFuf6UT51UwS/staking-info?at=22869643
If not, consider of adding them as tests or adding those cases in the STAKING_IMPLEMENTATION_DETAILS guide.
filvecchiato
Metadata
Metadata
Assignees
Labels
No labels