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:
Bastian Köcher
2023-01-29 21:56:10 +01:00
committed by GitHub
parent 700a732170
commit e851b3ae73
22 changed files with 47 additions and 906 deletions
+2 -7
View File
@@ -2237,9 +2237,7 @@ fn reward_from_authorship_event_handler_works() {
assert_eq!(<pallet_authorship::Pallet<Test>>::author(), Some(11));
Pallet::<Test>::note_author(11);
Pallet::<Test>::note_uncle(21, 1);
// Rewarding the same two times works.
Pallet::<Test>::note_uncle(11, 1);
Pallet::<Test>::note_author(11);
// Not mandatory but must be coherent with rewards
assert_eq_uvec!(Session::validators(), vec![11, 21]);
@@ -2248,10 +2246,7 @@ fn reward_from_authorship_event_handler_works() {
// 11 is rewarded as a block producer and uncle referencer and uncle producer
assert_eq!(
ErasRewardPoints::<Test>::get(active_era()),
EraRewardPoints {
individual: vec![(11, 20 + 2 * 2 + 1), (21, 1)].into_iter().collect(),
total: 26,
},
EraRewardPoints { individual: vec![(11, 20 * 2)].into_iter().collect(), total: 40 },
);
})
}