Minor fixes (#3751)

* fix warning

* use compact for balance type

* bump version
This commit is contained in:
Xiliang Chen
2019-10-03 14:16:07 +13:00
committed by Shawn Tabrizi
parent 97328ee6bb
commit 67a4bc4bdd
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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,
};
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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};