mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 13:17:56 +00:00
Bound Unsigned when signed is not supported. (#6367)
* bound unsigned when necessary * convert more type to AtLeast32BitUnsigned * Update primitives/arithmetic/src/traits.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * doc refactor * line reorganize Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
b17ccf24a8
commit
44fb311f1f
@@ -136,7 +136,7 @@ use sp_runtime::{
|
||||
};
|
||||
use crate::dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo, DispatchError};
|
||||
use sp_runtime::traits::SaturatedConversion;
|
||||
use sp_arithmetic::{Perbill, traits::{BaseArithmetic, Saturating}};
|
||||
use sp_arithmetic::{Perbill, traits::{BaseArithmetic, Saturating, Unsigned}};
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
||||
/// Re-export priority as type
|
||||
@@ -571,7 +571,7 @@ pub type WeightToFeeCoefficients<T> = SmallVec<[WeightToFeeCoefficient<T>; 4]>;
|
||||
/// An implementor should only implement the `polynomial` function.
|
||||
pub trait WeightToFeePolynomial {
|
||||
/// The type that is returned as result from polynomial evaluation.
|
||||
type Balance: BaseArithmetic + From<u32> + Copy;
|
||||
type Balance: BaseArithmetic + From<u32> + Copy + Unsigned;
|
||||
|
||||
/// Returns a polynomial that describes the weight to fee conversion.
|
||||
///
|
||||
@@ -611,7 +611,7 @@ pub trait WeightToFeePolynomial {
|
||||
pub struct IdentityFee<T>(sp_std::marker::PhantomData<T>);
|
||||
|
||||
impl<T> WeightToFeePolynomial for IdentityFee<T> where
|
||||
T: BaseArithmetic + From<u32> + Copy
|
||||
T: BaseArithmetic + From<u32> + Copy + Unsigned
|
||||
{
|
||||
type Balance = T;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user