mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 04:41:02 +00:00
Remove As (#2602)
* Start to remove the `As` bound on `SimpleArtithmetic` This just introduces standard numeric bounds, assuming a minimum of `u32`. Also included is a saturating from/into trait allowing ergonomic infallible conversion when you don't care if it saturates. * Remove As from Balances trait * Remove As from Aura module * Remove As from Babe module * Expunge `As` from contract * Council module * Democracy * Finality tracker * Grandpa * First bit of indices * indices * Line lengths * session * system * Staking * Square up all other uses of As. * RHD update * Fix build/test * Remove As trait * line widths * Remove final As ref * Update srml/staking/src/lib.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update core/client/src/cht.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Update core/client/db/src/light.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * whitespace * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> Co-Authored-By: André Silva <andre.beat@gmail.com> * Bring back u32 check for number on CLI
This commit is contained in:
@@ -116,7 +116,7 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use rstd::prelude::*;
|
||||
use primitives::traits::{As, Zero, One, Convert};
|
||||
use primitives::traits::{Zero, One, Convert};
|
||||
use srml_support::{StorageValue, StorageMap, for_each_tuple, decl_module, decl_event, decl_storage};
|
||||
use srml_support::{dispatch::Result, traits::OnFreeBalanceZero};
|
||||
use system::ensure_signed;
|
||||
@@ -200,9 +200,9 @@ decl_storage! {
|
||||
/// The current set of validators.
|
||||
pub Validators get(validators) config(): Vec<T::AccountId>;
|
||||
/// Current length of the session.
|
||||
pub SessionLength get(length) config(session_length): T::BlockNumber = T::BlockNumber::sa(1000);
|
||||
pub SessionLength get(length) config(session_length): T::BlockNumber = 1000.into();
|
||||
/// Current index of the session.
|
||||
pub CurrentIndex get(current_index) build(|_| T::BlockNumber::sa(0)): T::BlockNumber;
|
||||
pub CurrentIndex get(current_index) build(|_| 0.into()): T::BlockNumber;
|
||||
/// Timestamp when current session started.
|
||||
pub CurrentStart get(current_start) build(|_| T::Moment::zero()): T::Moment;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user