Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
e0f4cc7
Initial setup
gupnik May 15, 2023
5d688f8
Adds node block
gupnik May 15, 2023
1681e65
Uses UncheckedExtrinsic and removes Where section
gupnik May 15, 2023
3e461f1
Merge branch 'master' of github.com:paritytech/substrate into gupnik/…
gupnik May 23, 2023
a69a911
Merge branch 'master' of github.com:paritytech/substrate into gupnik/…
gupnik Jun 3, 2023
a5e7cb6
Merge branch 'master' of github.com:paritytech/substrate into gupnik/…
gupnik Jun 5, 2023
2590f43
Updates frame_system to use Block
gupnik Jun 5, 2023
f4e772a
Adds deprecation warning
gupnik Jun 5, 2023
989d2fc
Hopefully this fixes
gupnik Jun 10, 2023
ad7a25c
Fixes pallet-timestamp
gupnik Jun 11, 2023
c71aa74
Fixes node-template runtime
gupnik Jun 11, 2023
268e71f
Fixes node runtime
gupnik Jun 11, 2023
1616670
Fixes node-template
gupnik Jun 11, 2023
7bd6da7
Fixes cargo check
gupnik Jun 12, 2023
559e0e4
More fixes
gupnik Jun 12, 2023
c96d9bc
More fixes
gupnik Jun 13, 2023
0a19f0d
More fixes
gupnik Jun 13, 2023
6cb0ab9
".git/.scripts/commands/fmt/fmt.sh"
Jun 13, 2023
4ce055c
More fixes
gupnik Jun 13, 2023
9ab1b37
Removes unused import
gupnik Jun 13, 2023
54aebda
Fixes warnings
gupnik Jun 13, 2023
375bc0f
Fixes warnings
gupnik Jun 13, 2023
ee2eb17
Fixes warnings
gupnik Jun 13, 2023
9a9d41d
Fixes warnings
gupnik Jun 13, 2023
23bfc19
Fixes warnings
gupnik Jun 13, 2023
e63d231
Fixes warnings
gupnik Jun 13, 2023
3b50fe4
Fixes warnings
gupnik Jun 13, 2023
709d6a6
Fixes warnings
gupnik Jun 13, 2023
63decd8
Fixes tests
gupnik Jun 14, 2023
f66589a
Merge branch 'master' of github.com:paritytech/substrate into gupnik/…
gupnik Jun 14, 2023
b60fb81
".git/.scripts/commands/fmt/fmt.sh"
Jun 14, 2023
e5dafb9
Fixes tests
gupnik Jun 14, 2023
21abefc
Fixes doc link
gupnik Jun 14, 2023
8e2607a
Fixes warnings
gupnik Jun 14, 2023
2e4a3d2
Fixes warnings
gupnik Jun 14, 2023
b197dd0
Fixes warnings
gupnik Jun 14, 2023
dbf809e
Fixes warnings
gupnik Jun 14, 2023
922deb8
Fixes doc link and warnings
gupnik Jun 14, 2023
3377b38
Fixes tests
gupnik Jun 14, 2023
688922e
Minor update
gupnik Jun 14, 2023
dc3bf2c
Fixes tests
gupnik Jun 14, 2023
ccc76a2
Fixes impl_runtime_api
gupnik Jun 14, 2023
e0b1b14
Minor update
gupnik Jun 14, 2023
7eff183
Removes unused import
gupnik Jun 14, 2023
d39a6f2
Removes unused import
gupnik Jun 14, 2023
13db70d
Fixes tests
gupnik Jun 14, 2023
b8ded7f
Addresses review comments
gupnik Jun 18, 2023
f7a5450
Merge branch 'master' of github.com:paritytech/substrate into gupnik/…
gupnik Jun 18, 2023
7f82fe4
Merge branch 'master' of github.com:paritytech/substrate into gupnik/…
gupnik Jun 19, 2023
dbf3db3
Updates pallet-society
gupnik Jun 19, 2023
67a56fb
Updates pallet-society
gupnik Jun 19, 2023
6f40dda
Removes use_attr
gupnik Jun 19, 2023
701acd8
Fixes try-runtime-cli
gupnik Jun 19, 2023
f859b13
".git/.scripts/commands/fmt/fmt.sh"
Jun 19, 2023
204a1bc
Fixes unused import in ui tests
gupnik Jun 19, 2023
05b8873
Fixes sp-api tests
gupnik Jun 19, 2023
bf4b6aa
Merge branch 'master' of github.com:paritytech/substrate into gupnik/…
gupnik Jun 19, 2023
c9576f3
Fixes build
gupnik Jun 19, 2023
6f706bd
Uses u32 in mock block
gupnik Jun 20, 2023
60bd4c6
Uses u32 in mock block
gupnik Jun 20, 2023
dc946ad
Fixes type
gupnik Jun 20, 2023
f5f00d9
Revert "Fixes type"
gupnik Jun 20, 2023
cadd1e4
Revert "Uses u32 in mock block"
gupnik Jun 20, 2023
0040c20
Revert "Uses u32 in mock block"
gupnik Jun 20, 2023
88a92b6
Adds u32 block type
gupnik Jun 20, 2023
24e9580
Fixes doc tests
gupnik Jun 20, 2023
a2ecd52
".git/.scripts/commands/fmt/fmt.sh"
Jun 20, 2023
37d6cf4
Revert "Fixes doc tests"
gupnik Jun 20, 2023
6d18500
Merge branch 'master' of github.com:paritytech/substrate into gupnik/…
gupnik Jun 20, 2023
8461e97
Removes doc for decl_* to make CI happy
gupnik Jun 20, 2023
1c45275
Fixes sp-api doc
gupnik Jun 20, 2023
9296a79
Fixes rpc-support doc
gupnik Jun 20, 2023
86b6824
Merge branch 'master' of github.com:paritytech/substrate into gupnik/…
gupnik Jun 20, 2023
c537e8f
".git/.scripts/commands/fmt/fmt.sh"
Jun 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions frame/support/procedural/src/pallet/expand/hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub fn expand_hooks(def: &mut Def) -> proc_macro2::TokenStream {
let frame_system = &def.frame_system;
quote::quote! {
impl<#type_impl_gen>
#frame_support::traits::Hooks<<T as #frame_system::Config>::BlockNumber>
#frame_support::traits::Hooks<#frame_system::BlockNumberOf<T>>
for #pallet_ident<#type_use_gen> #where_clause {}
}
} else {
Expand Down Expand Up @@ -137,50 +137,50 @@ pub fn expand_hooks(def: &mut Def) -> proc_macro2::TokenStream {
#hooks_impl

impl<#type_impl_gen>
#frame_support::traits::OnFinalize<<T as #frame_system::Config>::BlockNumber>
#frame_support::traits::OnFinalize<#frame_system::BlockNumberOf<T>>
for #pallet_ident<#type_use_gen> #where_clause
{
fn on_finalize(n: <T as #frame_system::Config>::BlockNumber) {
fn on_finalize(n: #frame_system::BlockNumberOf<T>) {
#frame_support::sp_tracing::enter_span!(
#frame_support::sp_tracing::trace_span!("on_finalize")
);
<
Self as #frame_support::traits::Hooks<
<T as #frame_system::Config>::BlockNumber
#frame_system::BlockNumberOf<T>
>
>::on_finalize(n)
}
}

impl<#type_impl_gen>
#frame_support::traits::OnIdle<<T as #frame_system::Config>::BlockNumber>
#frame_support::traits::OnIdle<#frame_system::BlockNumberOf<T>>
for #pallet_ident<#type_use_gen> #where_clause
{
fn on_idle(
n: <T as #frame_system::Config>::BlockNumber,
n: #frame_system::BlockNumberOf<T>,
remaining_weight: #frame_support::weights::Weight
) -> #frame_support::weights::Weight {
<
Self as #frame_support::traits::Hooks<
<T as #frame_system::Config>::BlockNumber
#frame_system::BlockNumberOf<T>
>
>::on_idle(n, remaining_weight)
}
}

impl<#type_impl_gen>
#frame_support::traits::OnInitialize<<T as #frame_system::Config>::BlockNumber>
#frame_support::traits::OnInitialize<#frame_system::BlockNumberOf<T>>
for #pallet_ident<#type_use_gen> #where_clause
{
fn on_initialize(
n: <T as #frame_system::Config>::BlockNumber
n: #frame_system::BlockNumberOf<T>
) -> #frame_support::weights::Weight {
#frame_support::sp_tracing::enter_span!(
#frame_support::sp_tracing::trace_span!("on_initialize")
);
<
Self as #frame_support::traits::Hooks<
<T as #frame_system::Config>::BlockNumber
#frame_system::BlockNumberOf<T>
>
>::on_initialize(n)
}
Expand All @@ -205,7 +205,7 @@ pub fn expand_hooks(def: &mut Def) -> proc_macro2::TokenStream {

<
Self as #frame_support::traits::Hooks<
<T as #frame_system::Config>::BlockNumber
#frame_system::BlockNumberOf<T>
>
>::on_runtime_upgrade()
}
Expand All @@ -215,7 +215,7 @@ pub fn expand_hooks(def: &mut Def) -> proc_macro2::TokenStream {
<
Self
as
#frame_support::traits::Hooks<<T as #frame_system::Config>::BlockNumber>
#frame_support::traits::Hooks<#frame_system::BlockNumberOf<T>>
>::pre_upgrade()
}

Expand All @@ -226,19 +226,19 @@ pub fn expand_hooks(def: &mut Def) -> proc_macro2::TokenStream {
<
Self
as
#frame_support::traits::Hooks<<T as #frame_system::Config>::BlockNumber>
#frame_support::traits::Hooks<#frame_system::BlockNumberOf<T>>
>::post_upgrade(state)
}
}

impl<#type_impl_gen>
#frame_support::traits::OffchainWorker<<T as #frame_system::Config>::BlockNumber>
#frame_support::traits::OffchainWorker<#frame_system::BlockNumberOf<T>>
for #pallet_ident<#type_use_gen> #where_clause
{
fn offchain_worker(n: <T as #frame_system::Config>::BlockNumber) {
fn offchain_worker(n: #frame_system::BlockNumberOf<T>) {
<
Self as #frame_support::traits::Hooks<
<T as #frame_system::Config>::BlockNumber
#frame_system::BlockNumberOf<T>
>
>::offchain_worker(n)
}
Expand All @@ -253,7 +253,7 @@ pub fn expand_hooks(def: &mut Def) -> proc_macro2::TokenStream {
fn integrity_test() {
<
Self as #frame_support::traits::Hooks<
<T as #frame_system::Config>::BlockNumber
#frame_system::BlockNumberOf<T>
>
>::integrity_test()
}
Expand All @@ -262,17 +262,17 @@ pub fn expand_hooks(def: &mut Def) -> proc_macro2::TokenStream {

#[cfg(feature = "try-runtime")]
impl<#type_impl_gen>
#frame_support::traits::TryState<<T as #frame_system::Config>::BlockNumber>
#frame_support::traits::TryState<#frame_system::BlockNumberOf<T>>
for #pallet_ident<#type_use_gen> #where_clause
{
fn try_state(
n: <T as #frame_system::Config>::BlockNumber,
n: #frame_system::BlockNumberOf<T>,
_s: #frame_support::traits::TryStateSelect
) -> Result<(), #frame_support::sp_runtime::TryRuntimeError> {
#log_try_state
<
Self as #frame_support::traits::Hooks<
<T as #frame_system::Config>::BlockNumber
#frame_system::BlockNumberOf<T>
>
>::try_state(n)
}
Expand Down
4 changes: 2 additions & 2 deletions frame/system/src/extensions/check_genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use crate::{Config, Pallet};
use crate::{Config, Pallet, BlockNumberOf};
use codec::{Decode, Encode};
use scale_info::TypeInfo;
use sp_runtime::{
Expand Down Expand Up @@ -60,7 +60,7 @@ impl<T: Config + Send + Sync> SignedExtension for CheckGenesis<T> {
const IDENTIFIER: &'static str = "CheckGenesis";

fn additional_signed(&self) -> Result<Self::AdditionalSigned, TransactionValidityError> {
Ok(<Pallet<T>>::block_hash(T::BlockNumber::zero()))
Ok(<Pallet<T>>::block_hash(BlockNumberOf::<T>::zero()))
}

fn pre_dispatch(
Expand Down
4 changes: 2 additions & 2 deletions frame/system/src/extensions/check_mortality.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use crate::{BlockHash, Config, Pallet};
use crate::{BlockHash, Config, Pallet, BlockNumberOf};
use codec::{Decode, Encode};
use scale_info::TypeInfo;
use sp_runtime::{
Expand Down Expand Up @@ -78,7 +78,7 @@ impl<T: Config + Send + Sync> SignedExtension for CheckMortality<T> {

fn additional_signed(&self) -> Result<Self::AdditionalSigned, TransactionValidityError> {
let current_u64 = <Pallet<T>>::block_number().saturated_into::<u64>();
let n = self.0.birth(current_u64).saturated_into::<T::BlockNumber>();
let n = self.0.birth(current_u64).saturated_into::<BlockNumberOf<T>>();
if !<BlockHash<T>>::contains_key(n) {
Err(InvalidTransaction::AncientBirthBlock.into())
} else {
Expand Down
66 changes: 25 additions & 41 deletions frame/system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ use sp_runtime::traits::TrailingZeroInput;
use sp_runtime::{
generic,
traits::{
self, AtLeast32Bit, AtLeast32BitUnsigned, BadOrigin, BlockNumberProvider, Bounded,
self, AtLeast32Bit, BadOrigin, BlockNumberProvider, Bounded,
CheckEqual, Dispatchable, Hash, Lookup, LookupError, MaybeDisplay,
MaybeSerializeDeserialize, Member, One, Saturating, SimpleBitOps, StaticLookup, Zero,
},
Expand Down Expand Up @@ -196,6 +196,11 @@ impl<MaxNormal: Get<u32>, MaxOverflow: Get<u32>> ConsumerLimits for (MaxNormal,
}
}

/// The Header type used by the runtime.
pub type HeaderOf<T> = <<T as Config>::Block as traits::HeaderProvider>::Header;
/// The block number type used by the runtime.
pub type BlockNumberOf<T> = <HeaderOf<T> as traits::Header>::Number;

#[frame_support::pallet]
pub mod pallet {
use crate::{self as frame_system, pallet_prelude::*, *};
Expand All @@ -216,9 +221,7 @@ pub mod pallet {
#[frame_support::register_default_impl(TestDefaultConfig)]
impl DefaultConfig for TestDefaultConfig {
type Index = u32;
type BlockNumber = u32;
type Header = sp_runtime::generic::Header<Self::BlockNumber, Self::Hashing>;
type Block = sp_runtime::generic::Block<Self::Header, sp_runtime::OpaqueExtrinsic>;
type Block = sp_runtime::generic::Block<sp_runtime::generic::Header<u32, Self::Hashing>, sp_runtime::OpaqueExtrinsic>;
type Hash = sp_core::hash::H256;
type Hashing = sp_runtime::traits::BlakeTwo256;
type AccountId = u64;
Expand Down Expand Up @@ -287,21 +290,6 @@ pub mod pallet {
+ Copy
+ MaxEncodedLen;

/// The block number type used by the runtime.
type BlockNumber: Parameter
+ Member
+ MaybeSerializeDeserialize
+ Debug
+ MaybeDisplay
+ AtLeast32BitUnsigned
+ Default
+ Bounded
+ Copy
+ sp_std::hash::Hash
+ sp_std::str::FromStr
+ MaxEncodedLen
+ TypeInfo;

/// The output of the `Hashing` function.
type Hash: Parameter
+ Member
Expand Down Expand Up @@ -338,16 +326,12 @@ pub mod pallet {
/// functional/efficient alternatives.
type Lookup: StaticLookup<Target = Self::AccountId>;

/// The block header.
type Header: Parameter + traits::Header<Number = Self::BlockNumber, Hash = Self::Hash>;

/// The Block type used by the runtime. This is used by `construct_runtime` to retrieve the
/// extrinsics or other block specific data as needed.
type Block: Parameter + traits::Block<Header = Self::Header, Hash = Self::Hash>;
/// The block type.
type Block: Parameter + traits::Block<Hash = Self::Hash>;

/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
#[pallet::constant]
type BlockHashCount: Get<Self::BlockNumber>;
type BlockHashCount: Get<<<Self::Block as traits::HeaderProvider>::Header as traits::Header>::Number>;

/// The weight of runtime database operations the runtime can invoke.
#[pallet::constant]
Expand Down Expand Up @@ -406,7 +390,7 @@ pub mod pallet {
pub struct Pallet<T>(_);

#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
impl<T: Config> Hooks<BlockNumberOf<T>> for Pallet<T> {
#[cfg(feature = "std")]
fn integrity_test() {
sp_io::TestExternalities::default().execute_with(|| {
Expand Down Expand Up @@ -594,7 +578,7 @@ pub mod pallet {
#[pallet::storage]
#[pallet::getter(fn block_hash)]
pub type BlockHash<T: Config> =
StorageMap<_, Twox64Concat, T::BlockNumber, T::Hash, ValueQuery>;
StorageMap<_, Twox64Concat, BlockNumberOf<T>, T::Hash, ValueQuery>;

/// Extrinsics data for the current block (maps an extrinsic's index to its data).
#[pallet::storage]
Expand All @@ -607,7 +591,7 @@ pub mod pallet {
#[pallet::storage]
#[pallet::whitelist_storage]
#[pallet::getter(fn block_number)]
pub(super) type Number<T: Config> = StorageValue<_, T::BlockNumber, ValueQuery>;
pub(super) type Number<T: Config> = StorageValue<_, BlockNumberOf<T>, ValueQuery>;

/// Hash of the previous block.
#[pallet::storage]
Expand Down Expand Up @@ -646,14 +630,14 @@ pub mod pallet {
/// allows light-clients to leverage the changes trie storage tracking mechanism and
/// in case of changes fetch the list of events of interest.
///
/// The value has the type `(T::BlockNumber, EventIndex)` because if we used only just
/// The value has the type `(BlockNumberOf<T>, EventIndex)` because if we used only just
/// the `EventIndex` then in case if the topic has the same contents on the next block
/// no notification will be triggered thus the event might be lost.
#[pallet::storage]
#[pallet::unbounded]
#[pallet::getter(fn event_topics)]
pub(super) type EventTopics<T: Config> =
StorageMap<_, Blake2_128Concat, T::Hash, Vec<(T::BlockNumber, EventIndex)>, ValueQuery>;
StorageMap<_, Blake2_128Concat, T::Hash, Vec<(BlockNumberOf<T>, EventIndex)>, ValueQuery>;

/// Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.
#[pallet::storage]
Expand Down Expand Up @@ -684,7 +668,7 @@ pub mod pallet {
#[pallet::genesis_build]
impl<T: Config> GenesisBuild<T> for GenesisConfig {
fn build(&self) {
<BlockHash<T>>::insert::<_, T::Hash>(T::BlockNumber::zero(), hash69());
<BlockHash<T>>::insert::<_, T::Hash>(BlockNumberOf::<T>::zero(), hash69());
<ParentHash<T>>::put::<T::Hash>(hash69());
<LastRuntimeUpgrade<T>>::put(LastRuntimeUpgradeInfo::from(T::Version::get()));
<UpgradedToU32RefCount<T>>::put(true);
Expand Down Expand Up @@ -1356,7 +1340,7 @@ impl<T: Config> Pallet<T> {
}

/// Start the execution of a particular block.
pub fn initialize(number: &T::BlockNumber, parent_hash: &T::Hash, digest: &generic::Digest) {
pub fn initialize(number: &BlockNumberOf<T>, parent_hash: &T::Hash, digest: &generic::Digest) {
// populate environment
ExecutionPhase::<T>::put(Phase::Initialization);
storage::unhashed::put(well_known_keys::EXTRINSIC_INDEX, &0u32);
Expand All @@ -1373,7 +1357,7 @@ impl<T: Config> Pallet<T> {

/// Remove temporary "environment" entries in storage, compute the storage root and return the
/// resulting header for this block.
pub fn finalize() -> T::Header {
pub fn finalize() -> HeaderOf<T> {
log::debug!(
target: LOG_TARGET,
"[{:?}] {} extrinsics, length: {} (normal {}%, op: {}%, mandatory {}%) / normal weight:\
Expand Down Expand Up @@ -1445,7 +1429,7 @@ impl<T: Config> Pallet<T> {
let storage_root = T::Hash::decode(&mut &sp_io::storage::root(version)[..])
.expect("Node is configured to use the same hash; qed");

<T::Header as traits::Header>::new(
<HeaderOf<T> as traits::Header>::new(
number,
extrinsics_root,
storage_root,
Expand All @@ -1464,8 +1448,8 @@ impl<T: Config> Pallet<T> {
pub fn externalities() -> TestExternalities {
TestExternalities::new(sp_core::storage::Storage {
top: map![
<BlockHash<T>>::hashed_key_for(T::BlockNumber::zero()) => [69u8; 32].encode(),
<Number<T>>::hashed_key().to_vec() => T::BlockNumber::one().encode(),
<BlockHash<T>>::hashed_key_for(BlockNumberOf::<T>::zero()) => [69u8; 32].encode(),
<Number<T>>::hashed_key().to_vec() => BlockNumberOf::<T>::one().encode(),
<ParentHash<T>>::hashed_key().to_vec() => [69u8; 32].encode()
],
children_default: map![],
Expand Down Expand Up @@ -1510,7 +1494,7 @@ impl<T: Config> Pallet<T> {
/// Set the block number to something in particular. Can be used as an alternative to
/// `initialize` for tests that don't need to bother with the other environment entries.
#[cfg(any(feature = "std", feature = "runtime-benchmarks", test))]
pub fn set_block_number(n: T::BlockNumber) {
pub fn set_block_number(n: BlockNumberOf<T>) {
<Number<T>>::put(n);
}

Expand Down Expand Up @@ -1728,7 +1712,7 @@ impl<T: Config> HandleLifetime<T::AccountId> for Consumer<T> {
}

impl<T: Config> BlockNumberProvider for Pallet<T> {
type BlockNumber = <T as Config>::BlockNumber;
type BlockNumber = BlockNumberOf<T>;

fn current_block_number() -> Self::BlockNumber {
Pallet::<T>::block_number()
Expand Down Expand Up @@ -1794,11 +1778,11 @@ impl<T: Config> Lookup for ChainContext<T> {

/// Prelude to be used alongside pallet macro, for ease of use.
pub mod pallet_prelude {
pub use crate::{ensure_none, ensure_root, ensure_signed, ensure_signed_or_root};
pub use crate::{ensure_none, ensure_root, ensure_signed, ensure_signed_or_root, HeaderOf, BlockNumberOf};

/// Type alias for the `Origin` associated type of system config.
pub type OriginFor<T> = <T as crate::Config>::RuntimeOrigin;

/// Type alias for the `BlockNumber` associated type of system config.
pub type BlockNumberFor<T> = <T as crate::Config>::BlockNumber;
pub type BlockNumberFor<T> = BlockNumberOf<T>;
}
2 changes: 1 addition & 1 deletion frame/system/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ impl Config for Test {
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Index = u64;
type BlockNumber = u64;
type Hash = H256;
type Hashing = BlakeTwo256;
type AccountId = u64;
type Lookup = IdentityLookup<Self::AccountId>;
type Header = Header;
type Block = Block;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = ConstU64<10>;
type DbWeight = DbWeight;
Expand Down
2 changes: 1 addition & 1 deletion frame/system/src/mocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ pub type MockUncheckedExtrinsic<T, Signature = (), Extra = ()> = generic::Unchec

/// An implementation of `sp_runtime::traits::Block` to be used in tests.
pub type MockBlock<T> = generic::Block<
generic::Header<<T as crate::Config>::BlockNumber, sp_runtime::traits::BlakeTwo256>,
generic::Header<u64, sp_runtime::traits::BlakeTwo256>,
MockUncheckedExtrinsic<T>,
>;
Loading