Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
cb10d13
EPM and staking pallets: Adds new crate for integration tests
gpestana Dec 14, 2022
3ec1541
Adds ExtBuilder and helpers with initial conditions assertions
gpestana Dec 16, 2022
b818b29
removes account helpers; adds staking, session, etc genesis
gpestana Jan 1, 2023
624c728
Adds kusama incident test case
gpestana Jan 2, 2023
73197ae
Prepare for slashing test
gpestana Jan 5, 2023
762b0c0
Adds solution submission
gpestana Jan 6, 2023
869b677
slash_through_offending_threshold
gpestana Jan 6, 2023
eeb0438
Renames e2e integration tests dir and crate
gpestana Jan 8, 2023
888fa74
consistently slash 10% of validator set
gpestana Jan 9, 2023
8e73538
finishes continous_slashes_below_offending_threshold test
gpestana Jan 9, 2023
632e209
Update frame/election-provider-multi-phase/test-staking-e2e/src/lib.rs
gpestana Mar 13, 2023
ffc9aae
Update frame/election-provider-multi-phase/test-staking-e2e/src/lib.rs
gpestana Mar 13, 2023
81b2275
Update frame/election-provider-multi-phase/test-staking-e2e/src/lib.rs
gpestana Mar 13, 2023
b3c6e98
Update frame/election-provider-multi-phase/test-staking-e2e/src/mock.rs
gpestana Mar 15, 2023
a1dcd6c
Update frame/election-provider-multi-phase/test-staking-e2e/src/mock.rs
gpestana Mar 15, 2023
79d8d4b
Update frame/election-provider-multi-phase/test-staking-e2e/src/mock.rs
gpestana Mar 15, 2023
ac52c0b
mock fixes
gpestana Mar 15, 2023
40ac80f
Additional checks to delayed solution eras and mock fixes
gpestana Mar 15, 2023
f1de0a9
nits and addresses review comments; splits ext_builder into one per p…
gpestana Mar 15, 2023
84dfba6
helper to set balances ext builder
gpestana Mar 15, 2023
3597015
Merge branch 'master' into gpestana/9057-EPM-integration-tests
gpestana Mar 15, 2023
9829cc1
bring up mock.rs to master
gpestana Mar 15, 2023
3eb15b6
integration test fixes and additions
gpestana Mar 16, 2023
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
Prev Previous commit
Next Next commit
mock fixes
  • Loading branch information
gpestana committed Mar 15, 2023
commit ac52c0b3bc6df2acaf55f5bea41d1176fb9c438e
15 changes: 4 additions & 11 deletions frame/election-provider-multi-phase/test-staking-e2e/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use frame_support::{
};
use frame_system::EnsureRoot;
use sp_core::{ConstU32, Get, H256};
use sp_npos_elections::{BalancingConfig, ElectionScore, VoteWeight};
use sp_npos_elections::{ElectionScore, VoteWeight};
use sp_runtime::{
testing,
traits::{IdentityLookup, Zero},
Expand Down Expand Up @@ -127,10 +127,6 @@ impl pallet_balances::Config for Runtime {
type WeightInfo = ();
}

parameter_types! {
pub static CapturedMoment: Option<Moment> = None;
}

impl pallet_timestamp::Config for Runtime {
type Moment = Moment;
type OnTimestampSet = ();
Expand Down Expand Up @@ -181,9 +177,6 @@ parameter_types! {
pub static MaxElectingVoters: VoterIndex = 1000;
pub static MaxElectableTargets: TargetIndex = 1000;
pub static MaxActiveValidators: u32 = 1000;
pub static Balancing: Option<BalancingConfig> = Some( BalancingConfig { iterations: 0, tolerance: 0 } );
pub static BetterSignedThreshold: Perbill = Perbill::zero();
pub static BetterUnsignedThreshold: Perbill = Perbill::zero();
pub static OffchainRepeat: u32 = 5;
pub static MinerMaxLength: u32 = 256;
pub static MinerMaxWeight: Weight = BlockWeights::get().max_block;
Expand All @@ -199,8 +192,8 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
type EstimateCallFee = frame_support::traits::ConstU32<8>;
type SignedPhase = SignedPhase;
type UnsignedPhase = UnsignedPhase;
type BetterSignedThreshold = BetterSignedThreshold;
type BetterUnsignedThreshold = BetterUnsignedThreshold;
type BetterSignedThreshold = ();
type BetterUnsignedThreshold = ();
type OffchainRepeat = OffchainRepeat;
type MinerTxPriority = TransactionPriority;
type MinerConfig = Self;
Expand All @@ -217,7 +210,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
type Fallback =
frame_election_provider_support::NoElection<(AccountId, BlockNumber, Staking, MaxWinners)>;
type GovernanceFallback = onchain::OnChainExecution<OnChainSeqPhragmen>;
type Solver = SequentialPhragmen<AccountId, SolutionAccuracyOf<Runtime>, Balancing>;
type Solver = SequentialPhragmen<AccountId, SolutionAccuracyOf<Runtime>, ()>;
type ForceOrigin = EnsureRoot<AccountId>;
type MaxElectableTargets = MaxElectableTargets;
type MaxElectingVoters = MaxElectingVoters;
Expand Down