22extern crate membership_supernodes as membership_supernodes;
33extern crate mining_claims_token as mining_claims_token;
44extern crate mining_config_token as mining_config_token;
5- // extern crate mining_eligibility_proxy as mining_eligibility_proxy;
5+ extern crate mining_eligibility_proxy as mining_eligibility_proxy;
66extern crate mining_eligibility_token as mining_eligibility_token;
77extern crate mining_execution_token as mining_execution_token;
88extern crate mining_rates_token as mining_rates_token;
@@ -55,12 +55,12 @@ mod tests {
5555 Module as MiningConfigTokenModule ,
5656 Trait as MiningConfigTokenTrait ,
5757 } ;
58- // use mining_eligibility_proxy::{
59- // MiningEligibilityProxyClaimRewardeeData,
60- // MiningEligibilityProxyResult,
61- // Module as MiningEligibilityProxyModule,
62- // Trait as MiningEligibilityProxyTrait,
63- // };
58+ use mining_eligibility_proxy:: {
59+ MiningEligibilityProxyClaimRewardeeData ,
60+ MiningEligibilityProxyResult ,
61+ Module as MiningEligibilityProxyModule ,
62+ Trait as MiningEligibilityProxyTrait ,
63+ } ;
6464 use mining_eligibility_token:: {
6565 MiningEligibilityTokenResult ,
6666 Module as MiningEligibilityTokenModule ,
@@ -147,53 +147,53 @@ mod tests {
147147 type TransactionByteFee = ( ) ;
148148 type WeightToFee = IdentityFee < u64 > ;
149149 }
150- // parameter_types! {
151- // pub const ProposalBond: Permill = Permill::from_percent(5);
152- // pub const ProposalBondMinimum: BlockNumber = 1_000_000_000_000_000_000;
153- // pub const SpendPeriod: BlockNumber = 1;
154- // pub const Burn: Permill = Permill::from_percent(0);
155- // pub const TipCountdown: BlockNumber = 1;
156- // pub const TipFindersFee: Percent = Percent::from_percent(20);
157- // pub const TipReportDepositBase: u32 = 1_000_000_000_000_000_000;
158- // pub const MaximumReasonLength: u32 = 16384;
159- // pub const BountyValueMinimum: u64 = 1;
160- // pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);
161- // pub const BountyDepositBase: u64 = 80;
162- // pub const BountyDepositPayoutDelay: u32 = 3;
163- // pub const BountyUpdatePeriod: u32 = 20;
164- // pub const DataDepositPerByte: u64 = 1;
165- // pub const TreasuryModuleId: ModuleId = ModuleId(*b"py/trsry");
166- // }
150+ parameter_types ! {
151+ pub const ProposalBond : Permill = Permill :: from_percent( 5 ) ;
152+ pub const ProposalBondMinimum : BlockNumber = 1_000_000_000_000_000_000 ;
153+ pub const SpendPeriod : BlockNumber = 1 ;
154+ pub const Burn : Permill = Permill :: from_percent( 0 ) ;
155+ pub const TipCountdown : BlockNumber = 1 ;
156+ pub const TipFindersFee : Percent = Percent :: from_percent( 20 ) ;
157+ pub const TipReportDepositBase : u32 = 1_000_000_000_000_000_000 ;
158+ pub const MaximumReasonLength : u32 = 16384 ;
159+ pub const BountyValueMinimum : u64 = 1 ;
160+ pub const BountyCuratorDeposit : Permill = Permill :: from_percent( 50 ) ;
161+ pub const BountyDepositBase : u64 = 80 ;
162+ pub const BountyDepositPayoutDelay : u32 = 3 ;
163+ pub const BountyUpdatePeriod : u32 = 20 ;
164+ pub const DataDepositPerByte : u64 = 1 ;
165+ pub const TreasuryModuleId : ModuleId = ModuleId ( * b"py/trsry" ) ;
166+ }
167167
168- // impl pallet_treasury::Trait for Test {
169- // // type ApproveOrigin = pallet_collective::EnsureMembers<_4, AccountId, GeneralCouncilInstance>;
170- // type ApproveOrigin = EnsureRoot<u64>;
171- // type BountyCuratorDeposit = BountyCuratorDeposit;
172- // type BountyDepositBase = BountyDepositBase;
173- // type BountyDepositPayoutDelay = BountyDepositPayoutDelay;
174- // type BountyUpdatePeriod = BountyUpdatePeriod;
175- // type BountyValueMinimum = BountyValueMinimum;
176- // type Burn = Burn;
177- // type BurnDestination = ();
178- // type Currency = Balances;
179- // type DataDepositPerByte = DataDepositPerByte;
180- // type Event = ();
181- // type MaximumReasonLength = MaximumReasonLength;
182- // type ModuleId = TreasuryModuleId;
183- // type OnSlash = ();
184- // type ProposalBond = ProposalBond;
185- // type ProposalBondMinimum = ProposalBondMinimum;
186- // // type RejectOrigin = pallet_collective::EnsureMembers<_2, AccountId, GeneralCouncilInstance>;
187- // type RejectOrigin = EnsureRoot<u64>;
188- // type SpendPeriod = SpendPeriod;
189- // type TipCountdown = TipCountdown;
190- // type TipFindersFee = TipFindersFee;
191- // type TipReportDepositBase = TipReportDepositBase;
192- // // FIXME - upgrade to Substrate 3 since does not use Tippers, only then
193- // // can we add tests for the eligibility/proxy code
194- // // type Tippers = GeneralCouncilProvider;
195- // type WeightInfo = ();
196- // }
168+ impl pallet_treasury:: Trait for Test {
169+ // type ApproveOrigin = pallet_collective::EnsureMembers<_4, AccountId, GeneralCouncilInstance>;
170+ type ApproveOrigin = EnsureRoot < u64 > ;
171+ type BountyCuratorDeposit = BountyCuratorDeposit ;
172+ type BountyDepositBase = BountyDepositBase ;
173+ type BountyDepositPayoutDelay = BountyDepositPayoutDelay ;
174+ type BountyUpdatePeriod = BountyUpdatePeriod ;
175+ type BountyValueMinimum = BountyValueMinimum ;
176+ type Burn = Burn ;
177+ type BurnDestination = ( ) ;
178+ type Currency = Balances ;
179+ type DataDepositPerByte = DataDepositPerByte ;
180+ type Event = ( ) ;
181+ type MaximumReasonLength = MaximumReasonLength ;
182+ type ModuleId = TreasuryModuleId ;
183+ type OnSlash = ( ) ;
184+ type ProposalBond = ProposalBond ;
185+ type ProposalBondMinimum = ProposalBondMinimum ;
186+ // type RejectOrigin = pallet_collective::EnsureMembers<_2, AccountId, GeneralCouncilInstance>;
187+ type RejectOrigin = EnsureRoot < u64 > ;
188+ type SpendPeriod = SpendPeriod ;
189+ type TipCountdown = TipCountdown ;
190+ type TipFindersFee = TipFindersFee ;
191+ type TipReportDepositBase = TipReportDepositBase ;
192+ // FIXME - upgrade to Substrate 3 since does not use Tippers, only then
193+ // can we add tests for the eligibility/proxy code
194+ // type Tippers = GeneralCouncilProvider;
195+ type WeightInfo = ( ) ;
196+ }
197197 // FIXME - remove this when figure out how to use these types within mining-speed-boost runtime module itself
198198 impl roaming_operators:: Trait for Test {
199199 type Currency = Balances ;
@@ -234,12 +234,12 @@ mod tests {
234234 type MiningEligibilityTokenLockedPercentage = u32 ;
235235 // type MiningEligibilityTokenAuditorAccountID = u64;
236236 }
237- // impl MiningEligibilityProxyTrait for Test {
238- // type Currency = Balances;
239- // type Event = ();
240- // type MembershipSource = MembershipSupernodes;
241- // type MiningEligibilityProxyIndex = u64;
242- // }
237+ impl MiningEligibilityProxyTrait for Test {
238+ type Currency = Balances ;
239+ type Event = ( ) ;
240+ type MembershipSource = MembershipSupernodes ;
241+ type MiningEligibilityProxyIndex = u64 ;
242+ }
243243 impl MiningClaimsTokenTrait for Test {
244244 type Event = ( ) ;
245245 type MiningClaimsTokenClaimAmount = u64 ;
@@ -259,7 +259,7 @@ mod tests {
259259 pub type MiningRatesTokenTestModule = MiningRatesTokenModule < Test > ;
260260 pub type MiningSamplingTokenTestModule = MiningSamplingTokenModule < Test > ;
261261 pub type MiningEligibilityTokenTestModule = MiningEligibilityTokenModule < Test > ;
262- // pub type MiningEligibilityProxyTestModule = MiningEligibilityProxyModule<Test>;
262+ pub type MiningEligibilityProxyTestModule = MiningEligibilityProxyModule < Test > ;
263263 pub type MiningClaimsTokenTestModule = MiningClaimsTokenModule < Test > ;
264264 pub type MiningExecutionTokenTestModule = MiningExecutionTokenModule < Test > ;
265265 pub type MembershipSupernodesTestModule = MembershipSupernodesModule < Test > ;
0 commit comments