Browse Source

runtime: proposals: Remove unused code.

Shamil Gadelshin 4 years ago
parent
commit
2834339acf

+ 0 - 35
runtime-modules/proposals/codex/src/tests/mock.rs

@@ -1,6 +1,5 @@
 #![cfg(test)]
 
-use frame_support::dispatch::DispatchResult;
 use frame_support::traits::LockIdentifier;
 use frame_support::{impl_outer_dispatch, impl_outer_origin, parameter_types};
 use sp_core::H256;
@@ -99,40 +98,6 @@ impl proposals_engine::Trait for Test {
     type ProposalObserver = crate::Module<Test>;
 }
 
-impl proposals_engine::StakingHandler<Test> for () {
-    fn lock(_account_id: &u64, _amount: u64) {
-        unimplemented!()
-    }
-
-    fn unlock(_account_id: &u64) {
-        unimplemented!()
-    }
-
-    fn slash(_account_id: &u64, _amount: Option<u64>) -> u64 {
-        unimplemented!()
-    }
-
-    fn set_stake(_account_id: &u64, _new_stake: u64) -> DispatchResult {
-        unimplemented!()
-    }
-
-    fn is_member_staking_account(_member_id: &u64, _account_id: &u64) -> bool {
-        unimplemented!()
-    }
-
-    fn is_account_free_of_conflicting_stakes(_account_id: &u64) -> bool {
-        unimplemented!()
-    }
-
-    fn is_enough_balance_for_stake(_account_id: &u64, _amount: u64) -> bool {
-        unimplemented!()
-    }
-
-    fn current_stake(_account_id: &u64) -> u64 {
-        unimplemented!()
-    }
-}
-
 impl Default for crate::Call<Test> {
     fn default() -> Self {
         panic!("shouldn't call default for Call");

+ 0 - 35
runtime-modules/proposals/engine/src/tests/mock/mod.rs

@@ -19,7 +19,6 @@ pub use system;
 pub(crate) mod proposals;
 
 use crate::ProposalObserver;
-use frame_support::dispatch::DispatchResult;
 pub use proposals::*;
 
 // Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted.
@@ -98,40 +97,6 @@ impl crate::Trait for Test {
     type ProposalObserver = ();
 }
 
-impl crate::StakingHandler<Test> for () {
-    fn lock(_account_id: &u64, _amount: u64) {
-        unimplemented!()
-    }
-
-    fn unlock(_account_id: &u64) {
-        unimplemented!()
-    }
-
-    fn slash(_account_id: &u64, _amount: Option<u64>) -> u64 {
-        unimplemented!()
-    }
-
-    fn set_stake(_account_id: &u64, _new_stake: u64) -> DispatchResult {
-        unimplemented!()
-    }
-
-    fn is_member_staking_account(_member_id: &crate::MemberId<Test>, _account_id: &u64) -> bool {
-        unimplemented!()
-    }
-
-    fn is_account_free_of_conflicting_stakes(_account_id: &u64) -> bool {
-        unimplemented!()
-    }
-
-    fn is_enough_balance_for_stake(_account_id: &u64, _amount: u64) -> bool {
-        unimplemented!()
-    }
-
-    fn current_stake(_account_id: &u64) -> u64 {
-        unimplemented!()
-    }
-}
-
 impl ProposalObserver<Test> for () {
     fn proposal_removed(_proposal_id: &u32) {}
 }