Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Pub enum runtime to pub struct runtime #13250

Merged
2 changes: 1 addition & 1 deletion bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1701,7 +1701,7 @@ impl frame_benchmarking_pallet_pov::Config for Runtime {
}

construct_runtime!(
pub enum Runtime where
pub struct Runtime where
ggwpez marked this conversation as resolved.
Show resolved Hide resolved
Block = Block,
NodeBlock = node_primitives::Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
2 changes: 1 addition & 1 deletion frame/bags-list/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl bags_list::Config for Runtime {
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Runtime>;
type Block = frame_system::mocking::MockBlock<Runtime>;
frame_support::construct_runtime!(
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
Expand Down
2 changes: 1 addition & 1 deletion frame/election-provider-multi-phase/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub type UncheckedExtrinsic =
sp_runtime::generic::UncheckedExtrinsic<AccountId, RuntimeCall, (), ()>;

frame_support::construct_runtime!(
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
2 changes: 1 addition & 1 deletion frame/election-provider-support/src/onchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ mod tests {
pub type Block = sp_runtime::generic::Block<Header, UncheckedExtrinsic>;

frame_support::construct_runtime!(
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
2 changes: 1 addition & 1 deletion frame/executive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ mod tests {
}

frame_support::construct_runtime!(
pub enum Runtime where
pub struct Runtime where
Block = TestBlock,
NodeBlock = TestBlock,
UncheckedExtrinsic = TestUncheckedExtrinsic
Expand Down
5 changes: 3 additions & 2 deletions frame/fast-unstake/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,11 @@ impl fast_unstake::Config for Runtime {
type Block = frame_system::mocking::MockBlock<Runtime>;
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Runtime>;
frame_support::construct_runtime!(
pub enum Runtime where
pub struct Runtime
where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system,
Timestamp: pallet_timestamp,
Expand Down
2 changes: 1 addition & 1 deletion frame/im-online/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Runtime>
type Block = frame_system::mocking::MockBlock<Runtime>;

frame_support::construct_runtime!(
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
Expand Down
2 changes: 1 addition & 1 deletion frame/nomination-pools/benchmarking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ impl crate::Config for Runtime {}
type Block = frame_system::mocking::MockBlock<Runtime>;
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Runtime>;
frame_support::construct_runtime!(
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
2 changes: 1 addition & 1 deletion frame/nomination-pools/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ impl pools::Config for Runtime {
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Runtime>;
type Block = frame_system::mocking::MockBlock<Runtime>;
frame_support::construct_runtime!(
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
Expand Down
2 changes: 1 addition & 1 deletion frame/nomination-pools/test-staking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ type Block = frame_system::mocking::MockBlock<Runtime>;
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Runtime>;

frame_support::construct_runtime!(
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
2 changes: 1 addition & 1 deletion frame/offences/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Runtime>
type Block = frame_system::mocking::MockBlock<Runtime>;

frame_support::construct_runtime!(
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
Expand Down
5 changes: 3 additions & 2 deletions frame/support/test/compile_pass/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,11 @@ pub type Block = generic::Block<Header, UncheckedExtrinsic>;
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Signature, ()>;

construct_runtime!(
pub enum Runtime where
pub struct Runtime
where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system,
}
Expand Down
2 changes: 1 addition & 1 deletion frame/support/test/tests/construct_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ impl system::Config for Runtime {
}

frame_support::construct_runtime!(
pub enum Runtime where
pub struct Runtime where
bkchr marked this conversation as resolved.
Show resolved Hide resolved
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
Block = Block1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Sign
impl pallet::Config for Runtime {}

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
UncheckedExtrinsic = UncheckedExtrinsic,
Block = Block,
NodeBlock = Block,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
UncheckedExtrinsic = UncheckedExtrinsic,
Block = Block,
NodeBlock = Block,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
UncheckedExtrinsic = UncheckedExtrinsic,
Block = Block,
NodeBlock = Block,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
UncheckedExtrinsic = UncheckedExtrinsic,
Block = Block,
NodeBlock = Block,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Sign
impl pallet::Config for Runtime {}

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
TypeX = Block,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime {}
pub struct Runtime {}
}

fn main() {}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
{}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
UncheckedExtrinsic = UncheckedExtrinsic,
Block = Block,
NodeBlock = Block,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use frame_support::construct_runtime;

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
UncheckedExtrinsic = UncheckedExtrinsic
Block = Block,
NodeBlock = Block,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl frame_system::Config for Runtime {
}

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mod pallet_old {

}
construct_runtime! {
pub enum Runtime where
pub struct Runtime where
UncheckedExtrinsic = UncheckedExtrinsic,
Block = Block,
NodeBlock = Block,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl frame_system::Config for Runtime {
}

construct_runtime! {
pub enum Runtime where
pub struct Runtime where
Block = Block,
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
Expand Down
Loading