Convert all UK spelling to US (#2138)

* all the ise

* forgot a misspelling

* a few more replacements

* bump impl

* rollback and fixes

* bump impl again

* Add aliases for RPC

* Update on_demand.rs
This commit is contained in:
joe petrowski
2019-03-29 14:11:45 +01:00
committed by Gav Wood
parent a10e86ba5a
commit 0ddcbf747f
74 changed files with 453 additions and 451 deletions
+5 -5
View File
@@ -153,7 +153,7 @@ decl_module! {
Ok(())
}
fn on_finalise(n: T::BlockNumber) {
fn on_finalize(n: T::BlockNumber) {
if let Err(e) = Self::end_block(n) {
runtime_io::print(e);
}
@@ -306,7 +306,7 @@ impl<T: Trait> Module<T> {
}
/// Get the delegated voters for the current proposal.
/// I think this goes into a worker once https://github.com/paritytech/substrate/issues/1458 is done.
/// I think this goes into a worker once https://github.com/paritytech/substrate/issues/1458 is done.
fn tally_delegation(ref_index: ReferendumIndex) -> (BalanceOf<T>, BalanceOf<T>, BalanceOf<T>) {
Self::voters_for(ref_index).iter()
.fold((Zero::zero(), Zero::zero(), Zero::zero()), |(approve_acc, against_acc, capital_acc), voter| {
@@ -625,7 +625,7 @@ mod tests {
assert_eq!(Democracy::voters_for(r), vec![1]);
assert_eq!(Democracy::vote_of((r, 1)), AYE);
assert_eq!(Democracy::tally(r), (10, 0, 10));
assert_eq!(Democracy::end_block(System::block_number()), Ok(()));
assert_eq!(Balances::free_balance(&42), 2);
});
@@ -671,11 +671,11 @@ mod tests {
System::set_block_number(2);
let r = 0;
// Check behaviour with cycle.
// Check behavior with cycle.
assert_ok!(Democracy::delegate(Origin::signed(2), 1, 100));
assert_ok!(Democracy::delegate(Origin::signed(3), 2, 100));
assert_ok!(Democracy::delegate(Origin::signed(1), 3, 100));
assert_ok!(Democracy::vote(Origin::signed(1), r, AYE));
assert_eq!(Democracy::referendum_count(), 1);
@@ -37,7 +37,7 @@ pub enum VoteThreshold {
pub trait Approved<Balance> {
/// Given `approve` votes for and `against` votes against from a total electorate size of
/// `electorate` (`electorate - (approve + against)` are abstainers), then returns true if the
/// overall outcome is in favour of approval.
/// overall outcome is in favor of approval.
fn approved(&self, approve: Balance, against: Balance, voters: Balance, electorate: Balance) -> bool;
}
@@ -72,7 +72,7 @@ fn compare_rationals<T: Zero + Mul<T, Output = T> + Div<T, Output = T> + Rem<T,
impl<Balance: IntegerSquareRoot + Zero + Ord + Add<Balance, Output = Balance> + Mul<Balance, Output = Balance> + Div<Balance, Output = Balance> + Rem<Balance, Output = Balance> + Copy> Approved<Balance> for VoteThreshold {
/// Given `approve` votes for and `against` votes against from a total electorate size of
/// `electorate` of whom `voters` voted (`electorate - voters` are abstainers) then returns true if the
/// overall outcome is in favour of approval.
/// overall outcome is in favor of approval.
///
/// We assume each *voter* may cast more than one *vote*, hence `voters` is not necessarily equal to
/// `approve + against`.