mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 01:01:04 +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:
@@ -1217,8 +1217,6 @@ impl<T: Config> historical::SessionManager<T::AccountId, Exposure<T::AccountId,
|
||||
|
||||
/// Add reward points to block authors:
|
||||
/// * 20 points to the block producer for producing a (non-uncle) block in the relay chain,
|
||||
/// * 2 points to the block producer for each reference to a previously unreferenced uncle, and
|
||||
/// * 1 point to the producer of each referenced uncle block.
|
||||
impl<T> pallet_authorship::EventHandler<T::AccountId, T::BlockNumber> for Pallet<T>
|
||||
where
|
||||
T: Config + pallet_authorship::Config + pallet_session::Config,
|
||||
@@ -1226,14 +1224,6 @@ where
|
||||
fn note_author(author: T::AccountId) {
|
||||
Self::reward_by_ids(vec![(author, 20)])
|
||||
}
|
||||
fn note_uncle(uncle_author: T::AccountId, _age: T::BlockNumber) {
|
||||
// defensive-only: block author must exist.
|
||||
if let Some(block_author) = <pallet_authorship::Pallet<T>>::author() {
|
||||
Self::reward_by_ids(vec![(block_author, 2), (uncle_author, 1)])
|
||||
} else {
|
||||
crate::log!(warn, "block author not set, this should never happen");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// This is intended to be used with `FilterHistoricalOffences`.
|
||||
|
||||
Reference in New Issue
Block a user