Reintroduce header chain trait (#1622)

* reintroduce header chain trait

* renive BridgedChainWithMessages::maximal_extrinsic_size
This commit is contained in:
Svyatoslav Nikolsky
2022-11-11 15:31:01 +03:00
committed by Bastian Köcher
parent 3e00c5c022
commit 6dcecf4425
19 changed files with 648 additions and 831 deletions
+6
View File
@@ -195,6 +195,12 @@ pub trait Chain: Send + Sync + 'static {
fn max_extrinsic_weight() -> Weight;
}
/// Minimal parachain representation that may be used from no_std environment.
pub trait Parachain: Chain {
/// Parachain identifier.
const PARACHAIN_ID: u32;
}
/// Block number used by the chain.
pub type BlockNumberOf<C> = <C as Chain>::BlockNumber;
+1 -1
View File
@@ -32,7 +32,7 @@ use sp_std::{convert::TryFrom, fmt::Debug, vec, vec::Vec};
pub use chain::{
AccountIdOf, AccountPublicOf, BalanceOf, BlockNumberOf, Chain, EncodedOrDecodedCall, HashOf,
HasherOf, HeaderOf, IndexOf, SignatureOf, TransactionEraOf,
HasherOf, HeaderOf, IndexOf, Parachain, SignatureOf, TransactionEraOf,
};
pub use frame_support::storage::storage_prefix as storage_value_final_key;
use num_traits::{CheckedSub, One};