Skip to content

Commit 7d21e8e

Browse files
Added pending_rewards API call to Mainnet 8.X branch (#782) (#800)
1 parent f12d5a2 commit 7d21e8e

File tree

4 files changed

+25
-5
lines changed

4 files changed

+25
-5
lines changed

Cargo.lock

Lines changed: 13 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aleph-node"
3-
version = "0.8.2+mainnet"
3+
version = "0.8.3+mainnet"
44
authors = ["Cardinal Cryptography"]
55
description = "Aleph node binary"
66
edition = "2021"

bin/runtime/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aleph-runtime"
3-
version = "0.8.0+mainnet"
3+
version = "0.8.1+mainnet"
44
authors = ["Cardinal Cryptography"]
55
edition = "2021"
66
homepage = "https://alephzero.org"
@@ -38,6 +38,7 @@ pallet-vesting = { default-features = false, git = "https://github.com/Cardinal-
3838
pallet-multisig = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
3939
pallet-utility = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
4040
pallet-nomination-pools = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
41+
pallet-nomination-pools-runtime-api = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
4142

4243
sp-api = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
4344
sp-block-builder = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
@@ -103,6 +104,7 @@ std = [
103104
"frame-system-rpc-runtime-api/std",
104105
"primitives/std",
105106
"pallet-nomination-pools/std",
107+
"pallet-nomination-pools-runtime-api/std",
106108
]
107109
short_session = ["primitives/short_session"]
108110
try-runtime = [

bin/runtime/src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
104104
spec_name: create_runtime_str!("aleph-node"),
105105
impl_name: create_runtime_str!("aleph-node"),
106106
authoring_version: 1,
107-
spec_version: 39,
107+
spec_version: 46,
108108
impl_version: 1,
109109
apis: RUNTIME_API_VERSIONS,
110110
transaction_version: 14,
@@ -863,6 +863,13 @@ impl_runtime_apis! {
863863
}
864864
}
865865

866+
impl pallet_nomination_pools_runtime_api::NominationPoolsApi<Block, AccountId, Balance> for Runtime {
867+
fn pending_rewards(member_account: AccountId) -> Balance {
868+
NominationPools::pending_rewards(member_account)
869+
}
870+
}
871+
872+
866873
#[cfg(feature = "try-runtime")]
867874
impl frame_try_runtime::TryRuntime<Block> for Runtime {
868875
fn on_runtime_upgrade() -> (frame_support::weights::Weight, frame_support::weights::Weight) {

0 commit comments

Comments
 (0)