Serialize encoded logs. (#1478)

This commit is contained in:
Tomasz Drwięga
2019-01-19 12:36:14 +01:00
committed by Gav Wood
parent 34b21d6dd1
commit a69a09a165
2 changed files with 38 additions and 7 deletions
+3 -3
View File
@@ -588,7 +588,7 @@ pub trait Applyable: Sized + Send + Sync {
/// Something that acts like a `Digest` - it can have `Log`s `push`ed onto it and these `Log`s are
/// each `Codec`.
pub trait Digest: Member + MaybeSerializeDebugButNotDeserialize + Default {
type Hash: Member + MaybeSerializeDebugButNotDeserialize;
type Hash: Member;
type Item: DigestItem<Hash = Self::Hash>;
/// Get reference to all digest items.
@@ -611,8 +611,8 @@ pub trait Digest: Member + MaybeSerializeDebugButNotDeserialize + Default {
///
/// If the runtime does not supports some 'system' items, use `()` as a stub.
pub trait DigestItem: Codec + Member + MaybeSerializeDebugButNotDeserialize {
type Hash: Member + MaybeSerializeDebugButNotDeserialize;
type AuthorityId: Member + MaybeSerializeDebugButNotDeserialize + MaybeHash + codec::Encode + codec::Decode;
type Hash: Member;
type AuthorityId: Member + MaybeHash + codec::Encode + codec::Decode;
/// Returns Some if the entry is the `AuthoritiesChange` entry.
fn as_authorities_change(&self) -> Option<&[Self::AuthorityId]>;