mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-16 14:21:10 +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
@@ -20,7 +20,7 @@
|
||||
//! The staking rate in NPoS is the total amount of tokens staked by nominators and validators,
|
||||
//! divided by the total token supply.
|
||||
|
||||
use sp_runtime::{Perbill, traits::AtLeast32Bit, curve::PiecewiseLinear};
|
||||
use sp_runtime::{Perbill, traits::AtLeast32BitUnsigned, curve::PiecewiseLinear};
|
||||
|
||||
/// The total payout to all validators (and their nominators) per era and maximum payout.
|
||||
///
|
||||
@@ -34,7 +34,7 @@ pub fn compute_total_payout<N>(
|
||||
npos_token_staked: N,
|
||||
total_tokens: N,
|
||||
era_duration: u64
|
||||
) -> (N, N) where N: AtLeast32Bit + Clone {
|
||||
) -> (N, N) where N: AtLeast32BitUnsigned + Clone {
|
||||
// Milliseconds per year for the Julian year (365.25 days).
|
||||
const MILLISECONDS_PER_YEAR: u64 = 1000 * 3600 * 24 * 36525 / 100;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user