mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 21:31:02 +00:00
BEEFY: define on-chain beefy-genesis and use it to coordinate voter initialization (#13215)
* beefy: add support to configure BEEFY genesis * client/beefy: more flexible test runtime api * client/beefy: add tests for custom BEEFY genesis * client/beefy: ignore old state that didn't account for pallet genesis * client/beefy: fix clippy * frame/beefy: default BEEFY-genesis is block One::one() * frame/beefy: add extra doc comments --------- Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -43,7 +43,7 @@ use codec::{Codec, Decode, Encode};
|
||||
use scale_info::TypeInfo;
|
||||
use sp_application_crypto::RuntimeAppPublic;
|
||||
use sp_core::H256;
|
||||
use sp_runtime::traits::Hash;
|
||||
use sp_runtime::traits::{Hash, NumberFor};
|
||||
use sp_std::prelude::*;
|
||||
|
||||
/// Key type for BEEFY module.
|
||||
@@ -201,6 +201,9 @@ sp_api::decl_runtime_apis! {
|
||||
/// API necessary for BEEFY voters.
|
||||
pub trait BeefyApi
|
||||
{
|
||||
/// Return the block number where BEEFY consensus is enabled/started
|
||||
fn beefy_genesis() -> Option<NumberFor<Block>>;
|
||||
|
||||
/// Return the current active BEEFY validator set
|
||||
fn validator_set() -> Option<ValidatorSet<crypto::AuthorityId>>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user