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

Commit 069f173

Browse files
committed
Companion: Remove uncles related code
paritytech/substrate#13216
1 parent 23533c1 commit 069f173

File tree

12 files changed

+15
-41
lines changed

12 files changed

+15
-41
lines changed

pallets/collator-selection/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -496,10 +496,6 @@ pub mod pallet {
496496
DispatchClass::Mandatory,
497497
);
498498
}
499-
500-
fn note_uncle(_author: T::AccountId, _age: T::BlockNumber) {
501-
//TODO can we ignore this?
502-
}
503499
}
504500

505501
/// Play the role of the session manager.

pallets/collator-selection/src/mock.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ frame_support::construct_runtime!(
3939
NodeBlock = Block,
4040
UncheckedExtrinsic = UncheckedExtrinsic,
4141
{
42-
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
43-
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
44-
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
45-
Aura: pallet_aura::{Pallet, Storage, Config<T>},
46-
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
47-
CollatorSelection: collator_selection::{Pallet, Call, Storage, Event<T>},
48-
Authorship: pallet_authorship::{Pallet, Call, Storage, Inherent},
42+
System: frame_system,
43+
Timestamp: pallet_timestamp,
44+
Session: pallet_session,
45+
Aura: pallet_aura,
46+
Balances: pallet_balances,
47+
CollatorSelection: collator_selection,
48+
Authorship: pallet_authorship,
4949
}
5050
);
5151

@@ -110,8 +110,6 @@ impl FindAuthor<u64> for Author4 {
110110

111111
impl pallet_authorship::Config for Test {
112112
type FindAuthor = Author4;
113-
type UncleGenerations = ();
114-
type FilterUncle = ();
115113
type EventHandler = CollatorSelection;
116114
}
117115

parachain-template/runtime/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,6 @@ impl pallet_timestamp::Config for Runtime {
320320

321321
impl pallet_authorship::Config for Runtime {
322322
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
323-
type UncleGenerations = ConstU32<0>;
324-
type FilterUncle = ();
325323
type EventHandler = (CollatorSelection,);
326324
}
327325

parachains/common/src/impls.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,6 @@ mod tests {
228228

229229
impl pallet_authorship::Config for Test {
230230
type FindAuthor = OneAuthor;
231-
type UncleGenerations = ();
232-
type FilterUncle = ();
233231
type EventHandler = ();
234232
}
235233

parachains/runtimes/assets/statemine/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ impl pallet_timestamp::Config for Runtime {
178178

179179
impl pallet_authorship::Config for Runtime {
180180
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
181-
type UncleGenerations = ConstU32<0>;
182-
type FilterUncle = ();
183181
type EventHandler = (CollatorSelection,);
184182
}
185183

@@ -614,7 +612,7 @@ construct_runtime!(
614612
AssetTxPayment: pallet_asset_tx_payment::{Pallet, Event<T>} = 12,
615613

616614
// Collator support. the order of these 5 are important and shall not change.
617-
Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
615+
Authorship: pallet_authorship::{Pallet, Storage} = 20,
618616
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
619617
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
620618
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,

parachains/runtimes/assets/statemint/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,6 @@ impl pallet_timestamp::Config for Runtime {
193193

194194
impl pallet_authorship::Config for Runtime {
195195
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
196-
type UncleGenerations = ConstU32<0>;
197-
type FilterUncle = ();
198196
type EventHandler = (CollatorSelection,);
199197
}
200198

@@ -614,7 +612,7 @@ construct_runtime!(
614612
AssetTxPayment: pallet_asset_tx_payment::{Pallet, Event<T>} = 12,
615613

616614
// Collator support. the order of these 5 are important and shall not change.
617-
Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
615+
Authorship: pallet_authorship::{Pallet, Storage} = 20,
618616
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
619617
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
620618
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,

parachains/runtimes/assets/westmint/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ impl pallet_timestamp::Config for Runtime {
163163

164164
impl pallet_authorship::Config for Runtime {
165165
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
166-
type UncleGenerations = ConstU32<0>;
167-
type FilterUncle = ();
168166
type EventHandler = (CollatorSelection,);
169167
}
170168

@@ -624,7 +622,7 @@ construct_runtime!(
624622
AssetTxPayment: pallet_asset_tx_payment::{Pallet, Event<T>} = 12,
625623

626624
// Collator support. the order of these 5 are important and shall not change.
627-
Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
625+
Authorship: pallet_authorship::{Pallet, Storage} = 20,
628626
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
629627
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
630628
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,

parachains/runtimes/bridge-hubs/bridge-hub-kusama/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,6 @@ impl pallet_timestamp::Config for Runtime {
231231

232232
impl pallet_authorship::Config for Runtime {
233233
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
234-
type UncleGenerations = ConstU32<0>;
235-
type FilterUncle = ();
236234
type EventHandler = (CollatorSelection,);
237235
}
238236

@@ -407,7 +405,7 @@ construct_runtime!(
407405
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 11,
408406

409407
// Collator support. The order of these 4 are important and shall not change.
410-
Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
408+
Authorship: pallet_authorship::{Pallet, Storage} = 20,
411409
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
412410
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
413411
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,

parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,6 @@ impl pallet_timestamp::Config for Runtime {
268268

269269
impl pallet_authorship::Config for Runtime {
270270
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
271-
type UncleGenerations = ConstU32<0>;
272-
type FilterUncle = ();
273271
type EventHandler = (CollatorSelection,);
274272
}
275273

@@ -435,7 +433,7 @@ construct_runtime!(
435433
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 11,
436434

437435
// Collator support. The order of these 4 are important and shall not change.
438-
Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
436+
Authorship: pallet_authorship::{Pallet, Storage} = 20,
439437
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
440438
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
441439
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,

parachains/runtimes/collectives/collectives-polkadot/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ impl pallet_timestamp::Config for Runtime {
186186

187187
impl pallet_authorship::Config for Runtime {
188188
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
189-
type UncleGenerations = ConstU32<0>;
190-
type FilterUncle = ();
191189
type EventHandler = (CollatorSelection,);
192190
}
193191

@@ -505,7 +503,7 @@ construct_runtime!(
505503
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 11,
506504

507505
// Collator support. the order of these 5 are important and shall not change.
508-
Authorship: pallet_authorship::{Pallet, Call, Storage} = 20,
506+
Authorship: pallet_authorship::{Pallet, Storage} = 20,
509507
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 21,
510508
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 22,
511509
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 23,

0 commit comments

Comments
 (0)