mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
New genesis (#327)
* Update Substrate & Polkadot * Update chainspecs * Update again to fix test
This commit is contained in:
@@ -16,7 +16,7 @@ polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-f
|
||||
# Substrate dependencies
|
||||
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
sp-core = { git = "https://github.com/paritytech/substrate", version = "2.0.0-rc5", default-features = false, branch = "master" }
|
||||
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
sp-inherents = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
|
||||
|
||||
@@ -866,7 +866,7 @@ mod tests {
|
||||
use frame_support::{
|
||||
assert_ok,
|
||||
dispatch::UnfilteredDispatchable,
|
||||
impl_outer_event, impl_outer_origin, parameter_types,
|
||||
parameter_types,
|
||||
traits::{OnFinalize, OnInitialize},
|
||||
};
|
||||
use frame_system::{InitKind, RawOrigin};
|
||||
@@ -877,26 +877,22 @@ mod tests {
|
||||
use sp_version::RuntimeVersion;
|
||||
use std::cell::RefCell;
|
||||
|
||||
impl_outer_origin! {
|
||||
pub enum Origin for Test where system = frame_system {}
|
||||
}
|
||||
use crate as parachain_system;
|
||||
|
||||
mod parachain_system {
|
||||
pub use crate::Event;
|
||||
}
|
||||
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
|
||||
type Block = frame_system::mocking::MockBlock<Test>;
|
||||
|
||||
impl_outer_event! {
|
||||
pub enum TestEvent for Test {
|
||||
frame_system<T>,
|
||||
parachain_system,
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test where
|
||||
Block = Block,
|
||||
NodeBlock = Block,
|
||||
UncheckedExtrinsic = UncheckedExtrinsic,
|
||||
{
|
||||
System: frame_system::{Module, Call, Config, Storage, Event<T>},
|
||||
ParachainSystem: parachain_system::{Module, Call, Storage, Event},
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// For testing the pallet, we construct most of a mock runtime. This means
|
||||
// first constructing a configuration type (`Test`) which `impl`s each of the
|
||||
// configuration traits of modules we want to use.
|
||||
#[derive(Clone, Eq, PartialEq)]
|
||||
pub struct Test;
|
||||
parameter_types! {
|
||||
pub const BlockHashCount: u64 = 250;
|
||||
pub Version: RuntimeVersion = RuntimeVersion {
|
||||
@@ -912,7 +908,7 @@ mod tests {
|
||||
}
|
||||
impl frame_system::Config for Test {
|
||||
type Origin = Origin;
|
||||
type Call = ();
|
||||
type Call = Call;
|
||||
type Index = u64;
|
||||
type BlockNumber = u64;
|
||||
type Hash = H256;
|
||||
@@ -920,12 +916,12 @@ mod tests {
|
||||
type AccountId = u64;
|
||||
type Lookup = IdentityLookup<Self::AccountId>;
|
||||
type Header = Header;
|
||||
type Event = TestEvent;
|
||||
type Event = Event;
|
||||
type BlockHashCount = BlockHashCount;
|
||||
type BlockLength = ();
|
||||
type BlockWeights = ();
|
||||
type Version = Version;
|
||||
type PalletInfo = ();
|
||||
type PalletInfo = PalletInfo;
|
||||
type AccountData = ();
|
||||
type OnNewAccount = ();
|
||||
type OnKilledAccount = ();
|
||||
@@ -935,16 +931,13 @@ mod tests {
|
||||
type SS58Prefix = ();
|
||||
}
|
||||
impl Config for Test {
|
||||
type Event = TestEvent;
|
||||
type Event = Event;
|
||||
type OnValidationData = ();
|
||||
type SelfParaId = ParachainId;
|
||||
type DownwardMessageHandlers = SaveIntoThreadLocal;
|
||||
type HrmpMessageHandlers = SaveIntoThreadLocal;
|
||||
}
|
||||
|
||||
type ParachainSystem = Module<Test>;
|
||||
type System = frame_system::Module<Test>;
|
||||
|
||||
pub struct SaveIntoThreadLocal;
|
||||
|
||||
std::thread_local! {
|
||||
@@ -1241,7 +1234,7 @@ mod tests {
|
||||
let events = System::events();
|
||||
assert_eq!(
|
||||
events[0].event,
|
||||
TestEvent::parachain_system(Event::ValidationFunctionStored(1123))
|
||||
Event::parachain_system(crate::Event::ValidationFunctionStored(1123))
|
||||
);
|
||||
},
|
||||
)
|
||||
@@ -1252,7 +1245,7 @@ mod tests {
|
||||
let events = System::events();
|
||||
assert_eq!(
|
||||
events[0].event,
|
||||
TestEvent::parachain_system(Event::ValidationFunctionApplied(1234))
|
||||
Event::parachain_system(crate::Event::ValidationFunctionApplied(1234))
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -57,6 +57,7 @@ fn call_validate_block(
|
||||
Some(1024),
|
||||
sp_io::SubstrateHostFunctions::host_functions(),
|
||||
1,
|
||||
None,
|
||||
);
|
||||
|
||||
executor
|
||||
|
||||
Reference in New Issue
Block a user