Dispatch on-disabled digests from consensus modules (#3055)

* on-disable primitives for engines

* dispatch on-disabled digests from SRML consensus

* bump runtime versions

* use find_map
This commit is contained in:
Robert Habermeier
2019-07-08 16:22:15 +02:00
committed by Gavin Wood
parent 3d72844710
commit 13b9e49688
11 changed files with 140 additions and 72 deletions
@@ -26,11 +26,18 @@ use runtime_primitives::ConsensusEngineId;
/// The `ConsensusEngineId` of AuRa.
pub const AURA_ENGINE_ID: ConsensusEngineId = [b'a', b'u', b'r', b'a'];
/// The index of an authority.
pub type AuthorityIndex = u64;
/// An consensus log item for Aura.
#[derive(Decode, Encode)]
pub enum ConsensusLog<AuthorityId: Codec> {
/// The authorities have changed.
#[codec(index = "1")]
AuthoritiesChange(Vec<AuthorityId>),
/// Disable the authority with given index.
#[codec(index = "2")]
OnDisabled(AuthorityIndex),
}
decl_runtime_apis! {