You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 < 518 and chain = isKusama -> the era is considered as claimed "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 = 0 which can be implemented by mocking this request http://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.
The text was updated successfully, but these errors were encountered:
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 ofclaimed
that can potentially increase the performance of the endpoint.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:
era < 518
andchain = isKusama
-> the era is considered asclaimed
"automatically".status = undefined
-> which is when we do not have enough info to determine the status of the era.staking.erasStakersOverview
=null
&erasStakers
=0
which 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.The text was updated successfully, but these errors were encountered: