mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 12:51:02 +00:00
Reduce staking miner reward (companion substrate/pull/9395) (#3465)
* Reduce staking miner reward * Add EOF * Fix stuff * remove import * Add tyoe * remove redundant stuff * update Substrate Co-authored-by: kianenigma <kian@parity.io> Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -20,12 +20,7 @@ use frame_support::{
|
||||
parameter_types,
|
||||
weights::{DispatchClass, Weight},
|
||||
};
|
||||
use sp_runtime::{
|
||||
traits::{Zero, Dispatchable},
|
||||
FixedU128, FixedPointNumber, Perbill,
|
||||
};
|
||||
use pallet_transaction_payment::OnChargeTransaction;
|
||||
use frame_support::weights::{DispatchInfo, Pays};
|
||||
use sp_runtime::Perbill;
|
||||
use super::{BlockExecutionWeight, BlockLength, BlockWeights};
|
||||
|
||||
parameter_types! {
|
||||
@@ -48,25 +43,6 @@ parameter_types! {
|
||||
.get(DispatchClass::Normal);
|
||||
}
|
||||
|
||||
pub fn fee_for_submit_call<T>(
|
||||
multiplier: FixedU128,
|
||||
weight: Weight,
|
||||
length: u32,
|
||||
) -> primitives::v1::Balance
|
||||
where
|
||||
T: pallet_transaction_payment::Config,
|
||||
<T as pallet_transaction_payment::Config>::OnChargeTransaction:
|
||||
OnChargeTransaction<T, Balance = primitives::v1::Balance>,
|
||||
<T as frame_system::Config>::Call: Dispatchable<Info = DispatchInfo>,
|
||||
{
|
||||
let info = DispatchInfo { weight, class: DispatchClass::Normal, pays_fee: Pays::Yes };
|
||||
multiplier.saturating_mul_int(pallet_transaction_payment::Pallet::<T>::compute_fee(
|
||||
length,
|
||||
&info,
|
||||
Zero::zero(),
|
||||
))
|
||||
}
|
||||
|
||||
/// The numbers configured here should always be more than the the maximum limits of staking pallet
|
||||
/// to ensure election snapshot will not run out of memory.
|
||||
pub struct BenchmarkConfig;
|
||||
|
||||
Reference in New Issue
Block a user