From 67a4bc4bdd670d04dc7d39dead8163d35ae42dca Mon Sep 17 00:00:00 2001 From: Xiliang Chen <xlchen1291@gmail.com> Date: Thu, 3 Oct 2019 14:16:07 +1300 Subject: [PATCH] Minor fixes (#3751) * fix warning * use compact for balance type * bump version --- substrate/node/runtime/src/lib.rs | 2 +- substrate/srml/elections-phragmen/src/lib.rs | 2 +- substrate/srml/elections/src/lib.rs | 4 ++-- substrate/srml/scored-pool/src/lib.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/substrate/node/runtime/src/lib.rs b/substrate/node/runtime/src/lib.rs index 82ffe5390fd..190385d6bc0 100644 --- a/substrate/node/runtime/src/lib.rs +++ b/substrate/node/runtime/src/lib.rs @@ -85,7 +85,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. spec_version: 170, - impl_version: 170, + impl_version: 171, apis: RUNTIME_API_VERSIONS, }; diff --git a/substrate/srml/elections-phragmen/src/lib.rs b/substrate/srml/elections-phragmen/src/lib.rs index b7cf1a4013d..58c0f113406 100644 --- a/substrate/srml/elections-phragmen/src/lib.rs +++ b/substrate/srml/elections-phragmen/src/lib.rs @@ -181,7 +181,7 @@ decl_module! { /// Writes: O(V) given `V` votes. V is bounded by 16. /// # </weight> #[weight = SimpleDispatchInfo::FixedNormal(100_000)] - fn vote(origin, votes: Vec<T::AccountId>, value: BalanceOf<T>) { + fn vote(origin, votes: Vec<T::AccountId>, #[compact] value: BalanceOf<T>) { let who = ensure_signed(origin)?; let candidates_count = <Candidates<T>>::decode_len().unwrap_or(0) as usize; diff --git a/substrate/srml/elections/src/lib.rs b/substrate/srml/elections/src/lib.rs index 2a683879f87..8c900903497 100644 --- a/substrate/srml/elections/src/lib.rs +++ b/substrate/srml/elections/src/lib.rs @@ -344,7 +344,7 @@ decl_module! { votes: Vec<bool>, #[compact] index: VoteIndex, hint: SetIndex, - value: BalanceOf<T> + #[compact] value: BalanceOf<T> ) -> Result { let who = ensure_signed(origin)?; Self::do_set_approvals(who, votes, index, hint, value) @@ -361,7 +361,7 @@ decl_module! { votes: Vec<bool>, #[compact] index: VoteIndex, hint: SetIndex, - value: BalanceOf<T> + #[compact] value: BalanceOf<T> ) -> Result { let who = Self::proxy(ensure_signed(origin)?).ok_or("not a proxy")?; Self::do_set_approvals(who, votes, index, hint, value) diff --git a/substrate/srml/scored-pool/src/lib.rs b/substrate/srml/scored-pool/src/lib.rs index 4739e165d17..609f17b4572 100644 --- a/substrate/srml/scored-pool/src/lib.rs +++ b/substrate/srml/scored-pool/src/lib.rs @@ -91,7 +91,7 @@ mod tests; use codec::FullCodec; use rstd::prelude::*; use support::{ - StorageValue, decl_module, decl_storage, decl_event, ensure, + decl_module, decl_storage, decl_event, ensure, traits::{ChangeMembers, InitializeMembers, Currency, Get, ReservableCurrency}, }; use system::{self, ensure_root, ensure_signed}; -- GitLab