mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 22:27:56 +00:00
Minor fixes (#3751)
* fix warning * use compact for balance type * bump version
This commit is contained in:
committed by
Shawn Tabrizi
parent
97328ee6bb
commit
67a4bc4bdd
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user