Kill the light client, CHTs and change tries. (#10080)

* Remove light client, change tries and CHTs

* Update tests

* fmt

* Restore changes_root

* Fixed benches

* Cargo fmt

* fmt

* fmt
This commit is contained in:
Arkadiy Paronyan
2021-11-12 14:15:01 +01:00
committed by GitHub
parent 112b7dac47
commit 4cbbf0cf43
141 changed files with 532 additions and 17807 deletions
@@ -32,7 +32,7 @@ use sp_consensus_babe::{
};
use sp_consensus_slots::Slot;
use sp_core::{Pair, Public};
use sp_runtime::traits::{DigestItemFor, Header};
use sp_runtime::{traits::Header, DigestItem};
/// BABE verification parameters
pub(super) struct VerificationParams<'a, B: 'a + BlockT> {
@@ -61,10 +61,7 @@ pub(super) struct VerificationParams<'a, B: 'a + BlockT> {
/// with each having different validation logic.
pub(super) fn check_header<B: BlockT + Sized>(
params: VerificationParams<B>,
) -> Result<CheckedHeader<B::Header, VerifiedHeaderInfo<B>>, Error<B>>
where
DigestItemFor<B>: CompatibleDigestItem,
{
) -> Result<CheckedHeader<B::Header, VerifiedHeaderInfo>, Error<B>> {
let VerificationParams { mut header, pre_digest, slot_now, epoch } = params;
let authorities = &epoch.authorities;
@@ -137,9 +134,9 @@ where
Ok(CheckedHeader::Checked(header, info))
}
pub(super) struct VerifiedHeaderInfo<B: BlockT> {
pub(super) pre_digest: DigestItemFor<B>,
pub(super) seal: DigestItemFor<B>,
pub(super) struct VerifiedHeaderInfo {
pub(super) pre_digest: DigestItem,
pub(super) seal: DigestItem,
pub(super) author: AuthorityId,
}