mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 05:07:55 +00:00
73b9a8391f
closes https://github.com/paritytech/polkadot-sdk/issues/426. related to https://github.com/paritytech/polkadot-sdk/pull/1189. Would help offchain programs to query if there are unclaimed pages of rewards for a given era. The logic could look like below ```js // loop as long as all era pages are claimed. while (api.call.stakingApi.pendingRewards(era, validator_stash)) { api.tx.staking.payout_stakers(validator_stash, era) } ```
14 lines
451 B
Plaintext
14 lines
451 B
Plaintext
title: New runtime api to check if a validator has pending pages of rewards for an era.
|
|
|
|
doc:
|
|
- audience:
|
|
- Node Dev
|
|
- Runtime User
|
|
description: |
|
|
Creates a new runtime api to check if reward for an era is pending for a validator. Era rewards are paged and this
|
|
api will return true as long as there is one or more pages of era reward which are not claimed.
|
|
|
|
crates:
|
|
- name: pallet-staking
|
|
- name: pallet-staking-runtime-api
|