mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Keep BlockWeight in Storage (#6046)
* keep block weight in storage * Update lib.rs * rename to `BlockWeight`, update tests * remove println * make test better * keep extrinsics length clean
This commit is contained in:
@@ -62,7 +62,7 @@ pub struct TargetedFeeAdjustment<T>(sp_std::marker::PhantomData<T>);
|
||||
impl<T: Get<Perquintill>> Convert<Fixed128, Fixed128> for TargetedFeeAdjustment<T> {
|
||||
fn convert(multiplier: Fixed128) -> Fixed128 {
|
||||
let max_weight = MaximumBlockWeight::get();
|
||||
let block_weight = System::all_extrinsics_weight().total().min(max_weight);
|
||||
let block_weight = System::block_weight().total().min(max_weight);
|
||||
let target_weight = (T::get() * max_weight) as u128;
|
||||
let block_weight = block_weight as u128;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user