Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Companion for substrate #13215 - Add new BEEFY api to runtimes #6623

Merged
merged 6 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1737,6 +1737,11 @@ sp_api::impl_runtime_apis! {
}

impl beefy_primitives::BeefyApi<Block> for Runtime {
fn beefy_genesis() -> Option<BlockNumber> {
// dummy implementation due to lack of BEEFY pallet.
None
}

fn validator_set() -> Option<beefy_primitives::ValidatorSet<BeefyId>> {
// dummy implementation due to lack of BEEFY pallet.
None
Expand Down
5 changes: 5 additions & 0 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1854,6 +1854,11 @@ sp_api::impl_runtime_apis! {
}

impl beefy_primitives::BeefyApi<Block> for Runtime {
fn beefy_genesis() -> Option<BlockNumber> {
// dummy implementation due to lack of BEEFY pallet.
None
}

fn validator_set() -> Option<beefy_primitives::ValidatorSet<BeefyId>> {
// dummy implementation due to lack of BEEFY pallet.
None
Expand Down
4 changes: 4 additions & 0 deletions runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1750,6 +1750,10 @@ sp_api::impl_runtime_apis! {
}

impl beefy_primitives::BeefyApi<Block> for Runtime {
fn beefy_genesis() -> Option<BlockNumber> {
Beefy::genesis_block()
}

fn validator_set() -> Option<beefy_primitives::ValidatorSet<BeefyId>> {
Beefy::validator_set()
}
Expand Down
5 changes: 5 additions & 0 deletions runtime/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,11 @@ sp_api::impl_runtime_apis! {
}

impl beefy_primitives::BeefyApi<Block> for Runtime {
fn beefy_genesis() -> Option<BlockNumber> {
// dummy implementation due to lack of BEEFY pallet.
None
}

fn validator_set() -> Option<beefy_primitives::ValidatorSet<BeefyId>> {
// dummy implementation due to lack of BEEFY pallet.
None
Expand Down
5 changes: 5 additions & 0 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1480,6 +1480,11 @@ sp_api::impl_runtime_apis! {
}

impl beefy_primitives::BeefyApi<Block> for Runtime {
fn beefy_genesis() -> Option<BlockNumber> {
// dummy implementation due to lack of BEEFY pallet.
None
}

fn validator_set() -> Option<beefy_primitives::ValidatorSet<BeefyId>> {
// dummy implementation due to lack of BEEFY pallet.
None
Expand Down