Introduce OnReapAccount (#4585)

* Initial run and gun at `OnReapAccount`

* Fix some imports

* More fixes

* Whitespace

* More wack-a-mole

* Gotta catch em all

* Update lib.rs

* Small doc update

* Whitespace
This commit is contained in:
Shawn Tabrizi
2020-01-10 01:46:23 +01:00
committed by Gavin Wood
parent 78c73e76c3
commit a1e0076aa8
19 changed files with 57 additions and 5 deletions
+5 -1
View File
@@ -77,6 +77,7 @@ impl frame_system::Trait for Test {
impl pallet_balances::Trait for Test {
type Balance = u64;
type OnFreeBalanceZero = ();
type OnReapAccount = System;
type OnNewAccount = ();
type Event = ();
type TransferPayment = ();
@@ -118,13 +119,16 @@ impl Trait for Test {
type KickOrigin = EnsureSignedBy<KickOrigin, u64>;
type MembershipInitialized = TestChangeMembers;
type MembershipChanged = TestChangeMembers;
type Currency = pallet_balances::Module<Self>;
type Currency = Balances;
type CandidateDeposit = CandidateDeposit;
type Period = Period;
type Score = u64;
type ScoreOrigin = EnsureSignedBy<ScoreOrigin, u64>;
}
type System = frame_system::Module<Test>;
type Balances = pallet_balances::Module<Test>;
// This function basically just builds a genesis storage key/value store according to
// our desired mockup.
pub fn new_test_ext() -> sp_io::TestExternalities {