Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ impl balances::Trait for Runtime {
/// The type for recording an account's balance.
type Balance = u128;
/// What to do if an account's free balance gets zeroed.
type OnFreeBalanceZero = Staking;
type OnFreeBalanceZero = ();
/// What to do if a new account is created.
type OnNewAccount = Indices;
type OnNewAccount = ();
/// Restrict whether an account can transfer funds. We don't place any further restrictions.
type EnsureAccountLiquid = Staking;
/// The uniquitous event type.
Expand Down
12 changes: 10 additions & 2 deletions src/migration.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#![cfg_attr(not(feature = "std"), no_std)]

use srml_support::{StorageValue, dispatch::Result, decl_module, decl_storage, decl_event, ensure};
use srml_support::{StorageValue, StorageMap, dispatch::Result, decl_module, decl_storage, decl_event, ensure};
use runtime_primitives::traits::{As};
use system;
use rstd::prelude::*;
use runtime_io::print;
use crate::{VERSION};
use crate::membership::members;
use {indices};

pub trait Trait: system::Trait + members::Trait {
pub trait Trait: system::Trait + members::Trait + indices::Trait {
type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
}

Expand Down Expand Up @@ -40,6 +42,12 @@ impl<T: Trait> Module<T> {

<members::Module<T>>::initialize_storage();


// Clear account indices
for i in 0..65535 {
<indices::EnumSet<T>>::remove(&<T as indices::Trait>::AccountIndex::sa(i));
}

// ...
// add initialization of other modules introduced in this runtime
// ...
Expand Down