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:
Zeke Mostov
2021-07-23 02:58:29 -07:00
committed by GitHub
parent 7788de8164
commit aac9d77ee2
6 changed files with 170 additions and 216 deletions
+1 -25
View File
@@ -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;