From 92ab020f6d1e730b30480d3a65149d7a5695d49a Mon Sep 17 00:00:00 2001 From: kylezs Date: Wed, 30 Oct 2024 16:05:51 +0100 Subject: [PATCH] chore: rename ElectoralSystemStatus -> ElectionPalletStatus --- .../pallets/cf-elections/src/benchmarking.rs | 16 ++++++++-------- state-chain/pallets/cf-elections/src/tests.rs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/state-chain/pallets/cf-elections/src/benchmarking.rs b/state-chain/pallets/cf-elections/src/benchmarking.rs index 207b2f6aa65..079ada4f57d 100644 --- a/state-chain/pallets/cf-elections/src/benchmarking.rs +++ b/state-chain/pallets/cf-elections/src/benchmarking.rs @@ -124,7 +124,7 @@ mod benchmarks { T::EpochInfo::add_authority_info_for_epoch(epoch, vec![validator_id.clone()]); - Status::::put(ElectoralSystemStatus::Running); + Status::::put(ElectionPalletStatus::Running); #[extrinsic_call] stop_ignoring_my_votes(RawOrigin::Signed(caller)); @@ -141,7 +141,7 @@ mod benchmarks { T::EpochInfo::add_authority_info_for_epoch(epoch, vec![validator_id.clone()]); - Status::::put(ElectoralSystemStatus::Running); + Status::::put(ElectionPalletStatus::Running); assert!( !ContributingAuthorities::::contains_key(validator_id.clone()), @@ -274,7 +274,7 @@ mod benchmarks { assert!(ElectoralUnsynchronisedState::::get().is_some()); assert!(ElectoralUnsynchronisedSettings::::get().is_some()); assert!(ElectoralSettings::::get(NextElectionIdentifier::::get()).is_some()); - assert_eq!(Status::::get(), Some(ElectoralSystemStatus::Running)); + assert_eq!(Status::::get(), Some(ElectionPalletStatus::Running)); } #[benchmark] @@ -403,7 +403,7 @@ mod benchmarks { // Ensure elections are paused assert_eq!( Status::::get(), - Some(ElectoralSystemStatus::Paused { detected_corrupt_storage: false }) + Some(ElectionPalletStatus::Paused { detected_corrupt_storage: false }) ); } @@ -416,7 +416,7 @@ mod benchmarks { .dispatch_bypass_filter(T::EnsureGovernance::try_successful_origin().unwrap())); assert_eq!( Status::::get(), - Some(ElectoralSystemStatus::Paused { detected_corrupt_storage: false }) + Some(ElectionPalletStatus::Paused { detected_corrupt_storage: false }) ); assert_ok!(Call::::clear_all_votes { limit: 100u32, @@ -434,7 +434,7 @@ mod benchmarks { } // Ensure elections are unpaused - assert_eq!(Status::::get(), Some(ElectoralSystemStatus::Running)); + assert_eq!(Status::::get(), Some(ElectionPalletStatus::Running)); } #[benchmark] @@ -444,7 +444,7 @@ mod benchmarks { // Pause the election, and set corrupt storage to `true` assert_ok!(Call::::pause_elections {} .dispatch_bypass_filter(T::EnsureGovernance::try_successful_origin().unwrap())); - Status::::put(ElectoralSystemStatus::Paused { detected_corrupt_storage: true }); + Status::::put(ElectionPalletStatus::Paused { detected_corrupt_storage: true }); let call = Call::::validate_storage {}; @@ -457,7 +457,7 @@ mod benchmarks { assert_eq!( Status::::get(), - Some(ElectoralSystemStatus::Paused { detected_corrupt_storage: false }) + Some(ElectionPalletStatus::Paused { detected_corrupt_storage: false }) ); } diff --git a/state-chain/pallets/cf-elections/src/tests.rs b/state-chain/pallets/cf-elections/src/tests.rs index b97f23c931c..8df579c1085 100644 --- a/state-chain/pallets/cf-elections/src/tests.rs +++ b/state-chain/pallets/cf-elections/src/tests.rs @@ -151,7 +151,7 @@ impl ElectoralSystemTestExt for TestRunner { .expect("New election should have an identifier.") .unique_monotonic(); - assert_eq!(Status::::get(), Some(ElectoralSystemStatus::Running)); + assert_eq!(Status::::get(), Some(ElectionPalletStatus::Running)); Pallet::::with_electoral_access(|electoral_access| { electoral_access