mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 12:11:09 +00:00
Remove uncles related code (#13216)
The code was added without any clear usage. The inherent for example is not benchmarked and not used.
This commit is contained in:
@@ -607,10 +607,6 @@ impl<T: Config + pallet_authorship::Config>
|
||||
fn note_author(author: ValidatorId<T>) {
|
||||
Self::note_authorship(author);
|
||||
}
|
||||
|
||||
fn note_uncle(author: ValidatorId<T>, _age: T::BlockNumber) {
|
||||
Self::note_authorship(author);
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Config> Pallet<T> {
|
||||
|
||||
@@ -169,8 +169,6 @@ impl pallet_session::historical::Config for Runtime {
|
||||
|
||||
impl pallet_authorship::Config for Runtime {
|
||||
type FindAuthor = ();
|
||||
type UncleGenerations = ConstU64<5>;
|
||||
type FilterUncle = ();
|
||||
type EventHandler = ImOnline;
|
||||
}
|
||||
|
||||
|
||||
@@ -308,11 +308,10 @@ fn should_mark_online_validator_when_block_is_authored() {
|
||||
|
||||
// when
|
||||
ImOnline::note_author(1);
|
||||
ImOnline::note_uncle(2, 0);
|
||||
|
||||
// then
|
||||
assert!(ImOnline::is_online(0));
|
||||
assert!(ImOnline::is_online(1));
|
||||
assert!(!ImOnline::is_online(1));
|
||||
assert!(!ImOnline::is_online(2));
|
||||
});
|
||||
}
|
||||
@@ -338,7 +337,7 @@ fn should_not_send_a_report_if_already_online() {
|
||||
assert_eq!(Session::current_index(), 2);
|
||||
assert_eq!(Session::validators(), vec![1, 2, 3]);
|
||||
ImOnline::note_author(2);
|
||||
ImOnline::note_uncle(3, 0);
|
||||
ImOnline::note_author(3);
|
||||
|
||||
// when
|
||||
UintAuthorityId::set_all_keys(vec![1, 2, 3]);
|
||||
|
||||
Reference in New Issue
Block a user