paritytech / substrate-api-sidecar

REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.

Home Page:https://paritytech.github.io/substrate-api-sidecar/dist/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Tests for Staking Payouts after Historic Support implementation

Imod7 opened this issue · comments

Proposed Change or Idea
The rapid implementation of #1397 was needed by urgent requirements so no tests were included initially. It is important to add proper tests to ensure that the /accounts/{accountId}/staking-payouts endpoint works as expected after the historic support implementation. That way in the future we can avoid more fixes like #1415 and #1422

Example tests

  • Staking Payouts in Kusama chain for :
    • eras < 518
    • eras right in the change of 518 (special cases)
    • era = 0
  • Staking Payouts in Polkadot (or another chain) chain to ensure that general functionality (not related to historic support) is not affected
  • Tests that combine the available query parameters: era, depth, unclaimedOnly.