Companion for #7810 (Define ss58 prefix inside the runtime) (#2182)

* Companion for #7810

* Added missing trait items for tests

* Add another missing trait item

* fixup

* "Update Substrate"

Co-authored-by: parity-processbot <>
This commit is contained in:
Alexander Theißen
2020-12-30 23:52:35 +01:00
committed by GitHub
parent 0d36324839
commit 2c1f43a989
15 changed files with 156 additions and 142 deletions
+138 -138
View File
File diff suppressed because it is too large Load Diff
@@ -265,10 +265,6 @@ impl sp_externalities::Externalities for ValidationExternalities {
panic!("place_child_storage: unsupported feature for parachain validation") panic!("place_child_storage: unsupported feature for parachain validation")
} }
fn chain_id(&self) -> u64 {
panic!("chain_id: unsupported feature for parachain validation")
}
fn storage_root(&mut self) -> Vec<u8> { fn storage_root(&mut self) -> Vec<u8> {
panic!("storage_root: unsupported feature for parachain validation") panic!("storage_root: unsupported feature for parachain validation")
} }
+1
View File
@@ -653,6 +653,7 @@ mod tests {
type OnNewAccount = (); type OnNewAccount = ();
type OnKilledAccount = Balances; type OnKilledAccount = Balances;
type SystemWeightInfo = (); type SystemWeightInfo = ();
type SS58Prefix = ();
} }
parameter_types! { parameter_types! {
+1
View File
@@ -618,6 +618,7 @@ mod tests {
type OnNewAccount = (); type OnNewAccount = ();
type OnKilledAccount = Balances; type OnKilledAccount = Balances;
type SystemWeightInfo = (); type SystemWeightInfo = ();
type SS58Prefix = ();
} }
parameter_types! { parameter_types! {
pub const ExistentialDeposit: u64 = 1; pub const ExistentialDeposit: u64 = 1;
+1
View File
@@ -126,6 +126,7 @@ mod tests {
type OnNewAccount = (); type OnNewAccount = ();
type OnKilledAccount = (); type OnKilledAccount = ();
type SystemWeightInfo = (); type SystemWeightInfo = ();
type SS58Prefix = ();
} }
impl pallet_balances::Config for Test { impl pallet_balances::Config for Test {
+1
View File
@@ -236,6 +236,7 @@ mod multiplier_tests {
type OnNewAccount = (); type OnNewAccount = ();
type OnKilledAccount = (); type OnKilledAccount = ();
type SystemWeightInfo = (); type SystemWeightInfo = ();
type SS58Prefix = ();
} }
type System = frame_system::Module<Runtime>; type System = frame_system::Module<Runtime>;
@@ -331,6 +331,7 @@ mod tests {
type OnNewAccount = (); type OnNewAccount = ();
type OnKilledAccount = Balances; type OnKilledAccount = Balances;
type SystemWeightInfo = (); type SystemWeightInfo = ();
type SS58Prefix = ();
} }
impl<C> frame_system::offchain::SendTransactionTypes<C> for Test where impl<C> frame_system::offchain::SendTransactionTypes<C> for Test where
+1
View File
@@ -447,6 +447,7 @@ mod tests {
type OnNewAccount = (); type OnNewAccount = ();
type OnKilledAccount = Balances; type OnKilledAccount = Balances;
type SystemWeightInfo = (); type SystemWeightInfo = ();
type SS58Prefix = ();
} }
parameter_types! { parameter_types! {
+1
View File
@@ -984,6 +984,7 @@ mod tests {
type OnNewAccount = (); type OnNewAccount = ();
type OnKilledAccount = Balances; type OnKilledAccount = Balances;
type SystemWeightInfo = (); type SystemWeightInfo = ();
type SS58Prefix = ();
} }
parameter_types! { parameter_types! {
+2
View File
@@ -124,6 +124,7 @@ type MoreThanHalfCouncil = EnsureOneOf<
parameter_types! { parameter_types! {
pub const Version: RuntimeVersion = VERSION; pub const Version: RuntimeVersion = VERSION;
pub const SS58Prefix: u8 = 2;
} }
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
@@ -148,6 +149,7 @@ impl frame_system::Config for Runtime {
type OnNewAccount = (); type OnNewAccount = ();
type OnKilledAccount = (); type OnKilledAccount = ();
type SystemWeightInfo = weights::frame_system::WeightInfo<Runtime>; type SystemWeightInfo = weights::frame_system::WeightInfo<Runtime>;
type SS58Prefix = SS58Prefix;
} }
parameter_types! { parameter_types! {
+1
View File
@@ -90,6 +90,7 @@ impl frame_system::Config for Test {
type OnNewAccount = (); type OnNewAccount = ();
type OnKilledAccount = (); type OnKilledAccount = ();
type SystemWeightInfo = (); type SystemWeightInfo = ();
type SS58Prefix = ();
} }
impl crate::initializer::Config for Test { impl crate::initializer::Config for Test {
+2
View File
@@ -138,6 +138,7 @@ type MoreThanHalfCouncil = EnsureOneOf<
parameter_types! { parameter_types! {
pub const Version: RuntimeVersion = VERSION; pub const Version: RuntimeVersion = VERSION;
pub const SS58Prefix: u8 = 0;
} }
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
@@ -162,6 +163,7 @@ impl frame_system::Config for Runtime {
type OnNewAccount = (); type OnNewAccount = ();
type OnKilledAccount = (); type OnKilledAccount = ();
type SystemWeightInfo = weights::frame_system::WeightInfo<Runtime>; type SystemWeightInfo = weights::frame_system::WeightInfo<Runtime>;
type SS58Prefix = SS58Prefix;
} }
parameter_types! { parameter_types! {
+2
View File
@@ -220,6 +220,7 @@ impl Filter<Call> for BaseFilter {
parameter_types! { parameter_types! {
pub const Version: RuntimeVersion = VERSION; pub const Version: RuntimeVersion = VERSION;
pub const SS58Prefix: u8 = 42;
} }
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
@@ -244,6 +245,7 @@ impl frame_system::Config for Runtime {
type OnNewAccount = (); type OnNewAccount = ();
type OnKilledAccount = (); type OnKilledAccount = ();
type SystemWeightInfo = (); type SystemWeightInfo = ();
type SS58Prefix = SS58Prefix;
} }
parameter_types! { parameter_types! {
+2
View File
@@ -121,6 +121,7 @@ sp_api::decl_runtime_apis! {
parameter_types! { parameter_types! {
pub const Version: RuntimeVersion = VERSION; pub const Version: RuntimeVersion = VERSION;
pub const SS58Prefix: u8 = 42;
} }
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
@@ -145,6 +146,7 @@ impl frame_system::Config for Runtime {
type OnNewAccount = (); type OnNewAccount = ();
type OnKilledAccount = (); type OnKilledAccount = ();
type SystemWeightInfo = (); type SystemWeightInfo = ();
type SS58Prefix = SS58Prefix;
} }
impl<C> frame_system::offchain::SendTransactionTypes<C> for Runtime where impl<C> frame_system::offchain::SendTransactionTypes<C> for Runtime where
+2
View File
@@ -115,6 +115,7 @@ impl Filter<Call> for BaseFilter {
parameter_types! { parameter_types! {
pub const Version: RuntimeVersion = VERSION; pub const Version: RuntimeVersion = VERSION;
pub const SS58Prefix: u8 = 42;
} }
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
@@ -139,6 +140,7 @@ impl frame_system::Config for Runtime {
type OnNewAccount = (); type OnNewAccount = ();
type OnKilledAccount = (); type OnKilledAccount = ();
type SystemWeightInfo = weights::frame_system::WeightInfo<Runtime>; type SystemWeightInfo = weights::frame_system::WeightInfo<Runtime>;
type SS58Prefix = SS58Prefix;
} }
parameter_types! { parameter_types! {