Skip to content

Commit

Permalink
Added pending_rewards API call to Mainnet 8.X branch (#782) (#800)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin-Radecki authored Dec 12, 2022
1 parent f12d5a2 commit 7d21e8e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
15 changes: 13 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bin/node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aleph-node"
version = "0.8.2+mainnet"
version = "0.8.3+mainnet"
authors = ["Cardinal Cryptography"]
description = "Aleph node binary"
edition = "2021"
Expand Down
4 changes: 3 additions & 1 deletion bin/runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aleph-runtime"
version = "0.8.0+mainnet"
version = "0.8.1+mainnet"
authors = ["Cardinal Cryptography"]
edition = "2021"
homepage = "https://alephzero.org"
Expand Down Expand Up @@ -38,6 +38,7 @@ pallet-vesting = { default-features = false, git = "https://github.com/Cardinal-
pallet-multisig = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
pallet-utility = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
pallet-nomination-pools = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
pallet-nomination-pools-runtime-api = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }

sp-api = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
sp-block-builder = { default-features = false, git = "https://github.com/Cardinal-Cryptography/substrate.git", branch = "aleph-v0.9.28" }
Expand Down Expand Up @@ -103,6 +104,7 @@ std = [
"frame-system-rpc-runtime-api/std",
"primitives/std",
"pallet-nomination-pools/std",
"pallet-nomination-pools-runtime-api/std",
]
short_session = ["primitives/short_session"]
try-runtime = [
Expand Down
9 changes: 8 additions & 1 deletion bin/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("aleph-node"),
impl_name: create_runtime_str!("aleph-node"),
authoring_version: 1,
spec_version: 39,
spec_version: 46,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 14,
Expand Down Expand Up @@ -863,6 +863,13 @@ impl_runtime_apis! {
}
}

impl pallet_nomination_pools_runtime_api::NominationPoolsApi<Block, AccountId, Balance> for Runtime {
fn pending_rewards(member_account: AccountId) -> Balance {
NominationPools::pending_rewards(member_account)
}
}


#[cfg(feature = "try-runtime")]
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade() -> (frame_support::weights::Weight, frame_support::weights::Weight) {
Expand Down

0 comments on commit 7d21e8e

Please sign in to comment.