mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
Relocate weight to paint + decouple from extensions (#4124)
* Fisr migrated version of weight to paint * Bump * Minor nits * Some review fixes. * Line width * Revert spec bump * Fix build * Update lock file * Update palette/executive/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update palette/membership/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -17,10 +17,9 @@
|
||||
//! Some configurable implementations as associated type for the substrate runtime.
|
||||
|
||||
use node_primitives::Balance;
|
||||
use sr_primitives::weights::Weight;
|
||||
use sr_primitives::traits::{Convert, Saturating};
|
||||
use sr_primitives::{Fixed64, Perbill};
|
||||
use support::traits::{OnUnbalanced, Currency, Get};
|
||||
use support::{traits::{OnUnbalanced, Currency, Get}, weights::Weight};
|
||||
use crate::{Balances, System, Authorship, MaximumBlockWeight, NegativeImbalance};
|
||||
|
||||
pub struct Author;
|
||||
@@ -116,10 +115,10 @@ impl<T: Get<Perbill>> Convert<Fixed64, Fixed64> for TargetedFeeAdjustment<T> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use sr_primitives::weights::Weight;
|
||||
use sr_primitives::assert_eq_error_rate;
|
||||
use crate::{MaximumBlockWeight, AvailableBlockRatio, Runtime};
|
||||
use crate::{constants::currency::*, TransactionPayment, TargetBlockFullness};
|
||||
use support::weights::Weight;
|
||||
|
||||
fn max() -> Weight {
|
||||
MaximumBlockWeight::get()
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
|
||||
use rstd::prelude::*;
|
||||
use support::{
|
||||
construct_runtime, parameter_types, traits::{SplitTwoWays, Currency, Randomness}
|
||||
construct_runtime, parameter_types,
|
||||
weights::Weight,
|
||||
traits::{SplitTwoWays, Currency, Randomness},
|
||||
};
|
||||
use primitives::u32_trait::{_1, _2, _3, _4};
|
||||
use node_primitives::{AccountId, AccountIndex, Balance, BlockNumber, Hash, Index, Moment, Signature};
|
||||
@@ -30,7 +32,6 @@ use sr_api::impl_runtime_apis;
|
||||
use sr_primitives::{Permill, Perbill, ApplyResult, impl_opaque_keys, generic, create_runtime_str};
|
||||
use sr_primitives::curve::PiecewiseLinear;
|
||||
use sr_primitives::transaction_validity::TransactionValidity;
|
||||
use sr_primitives::weights::Weight;
|
||||
use sr_primitives::traits::{
|
||||
self, BlakeTwo256, Block as BlockT, NumberFor, StaticLookup, SaturatedConversion,
|
||||
OpaqueKeys,
|
||||
@@ -732,7 +733,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn block_hooks_weight_should_not_exceed_limits() {
|
||||
use sr_primitives::weights::WeighBlock;
|
||||
use support::weights::WeighBlock;
|
||||
let check_for_block = |b| {
|
||||
let block_hooks_weight =
|
||||
<AllModules as WeighBlock<BlockNumber>>::on_initialize(b) +
|
||||
|
||||
Reference in New Issue
Block a user