mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 05:51:02 +00:00
Moved DigestItem impl to impl_outer_log (#932)
* moved DigestItem impl to impl_outer_log * Enable backtrace collecting on the CI * internal module is not required in impl_outer_log * Revert "internal module is not required in impl_outer_log" This reverts commit 5430446971cdf5fd5735863b86cd08a11d35d1dd. * Revert "moved DigestItem impl to impl_outer_log" This reverts commit 8872bbee963dbb4316251222f5c0757303fb3f52. * Revert "Revert "moved DigestItem impl to impl_outer_log"" This reverts commit 47afd59682f8828665bd9cfb293b40ce4c4787af. * Revert "Revert "internal module is not required in impl_outer_log"" This reverts commit 9ae640010c00ef134099d5b6a4430d330be134b2. * More diagnostics * check if only 1 test fails * test is back + some "traces" * removed some traces * removed "traces"
This commit is contained in:
committed by
Gav Wood
parent
2604474880
commit
ca38fd72f6
@@ -113,17 +113,11 @@ impl<Hash: Codec + Member, AuthorityId: Codec + Member> traits::DigestItem for D
|
||||
type AuthorityId = AuthorityId;
|
||||
|
||||
fn as_authorities_change(&self) -> Option<&[Self::AuthorityId]> {
|
||||
match *self {
|
||||
DigestItem::AuthoritiesChange(ref authorities) => Some(authorities),
|
||||
_ => None,
|
||||
}
|
||||
self.dref().as_authorities_change()
|
||||
}
|
||||
|
||||
fn as_changes_trie_root(&self) -> Option<&Hash> {
|
||||
match *self {
|
||||
DigestItem::ChangesTrieRoot(ref changes_trie_root) => Some(changes_trie_root),
|
||||
_ => None,
|
||||
}
|
||||
self.dref().as_changes_trie_root()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,6 +144,22 @@ impl<Hash: Decode, AuthorityId: Decode> Decode for DigestItem<Hash, AuthorityId>
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, Hash: Codec + Member, AuthorityId: Codec + Member> DigestItemRef<'a, Hash, AuthorityId> {
|
||||
pub fn as_authorities_change(&self) -> Option<&'a [AuthorityId]> {
|
||||
match *self {
|
||||
DigestItemRef::AuthoritiesChange(ref authorities) => Some(authorities),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn as_changes_trie_root(&self) -> Option<&'a Hash> {
|
||||
match *self {
|
||||
DigestItemRef::ChangesTrieRoot(ref changes_trie_root) => Some(changes_trie_root),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, Hash: Encode, AuthorityId: Encode> Encode for DigestItemRef<'a, Hash, AuthorityId> {
|
||||
fn encode(&self) -> Vec<u8> {
|
||||
let mut v = Vec::new();
|
||||
|
||||
Reference in New Issue
Block a user