Browse Source

runtime: council: fix compilation and tests after merge with olympia

conectado 4 years ago
parent
commit
b24e1ae2de
2 changed files with 13 additions and 4 deletions
  1. 8 2
      runtime-modules/council/src/mock.rs
  2. 5 2
      runtime/src/lib.rs

+ 8 - 2
runtime-modules/council/src/mock.rs

@@ -196,7 +196,8 @@ parameter_types! {
     pub const MinimumVotingStake: u64 = 10000;
     pub const MaxSaltLength: u64 = 32; // use some multiple of 8 for ez testing
     pub const VotingLockId: LockIdentifier = *b"referend";
-    pub const MembershipFee: u64 = 100;
+    pub const DefaultMembershipPrice: u64 = 100;
+    pub const DefaultInitialInvitationBalance: u64 = 100;
     pub const MinimumPeriod: u64 = 5;
 }
 
@@ -289,8 +290,9 @@ impl balances::Trait for Runtime {
 
 impl membership::Trait for Runtime {
     type Event = TestEvent;
-    type MembershipFee = MembershipFee;
+    type DefaultMembershipPrice = DefaultMembershipPrice;
     type WorkingGroup = ();
+    type DefaultInitialInvitationBalance = DefaultInitialInvitationBalance;
 }
 
 impl common::working_group::WorkingGroupIntegration<Runtime> for () {
@@ -300,6 +302,10 @@ impl common::working_group::WorkingGroupIntegration<Runtime> for () {
     ) -> DispatchResult {
         unimplemented!();
     }
+
+    fn get_leader_member_id() -> Option<<Runtime as common::Trait>::MemberId> {
+        unimplemented!();
+    }
 }
 
 impl pallet_timestamp::Trait for Runtime {

+ 5 - 2
runtime/src/lib.rs

@@ -572,8 +572,11 @@ impl council::Trait for Runtime {
         membership_id: &Self::MemberId,
         account_id: &<Self as frame_system::Trait>::AccountId,
     ) -> bool {
-        membership::Module::<Runtime>::ensure_member_controller_account(account_id, membership_id)
-            .is_ok()
+        membership::Module::<Runtime>::ensure_is_controller_account_for_member(
+            membership_id,
+            account_id,
+        )
+        .is_ok()
     }
 
     fn new_council_elected(_elected_members: &[council::CouncilMemberOf<Self>]) {