From c4d7a8840983d30569767c81b42653d8d2af3854 Mon Sep 17 00:00:00 2001
From: bgallois <benjamin@gallois.cc>
Date: Tue, 5 Mar 2024 19:05:58 +0100
Subject: [PATCH] rename echec in failure

---
 pallets/distance/src/benchmarking.rs          | 6 +++---
 pallets/distance/src/lib.rs                   | 6 +++---
 pallets/distance/src/weights.rs               | 4 ++--
 runtime/common/src/weights/pallet_distance.rs | 2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/pallets/distance/src/benchmarking.rs b/pallets/distance/src/benchmarking.rs
index 2ea758711..7b8d7c850 100644
--- a/pallets/distance/src/benchmarking.rs
+++ b/pallets/distance/src/benchmarking.rs
@@ -179,7 +179,7 @@ mod benchmarks {
 
     #[benchmark]
     fn do_evaluation_success() -> Result<(), BenchmarkError> {
-        // Benchmark do_evaluation in case of one success.
+        // Benchmarking do_evaluation in case of a single success.
         CurrentPoolIndex::<T>::put(0);
         frame_system::pallet::Pallet::<T>::set_block_number(1u32.into());
         let idty = T::IdtyIndex::one();
@@ -216,8 +216,8 @@ mod benchmarks {
     }
 
     #[benchmark]
-    fn do_evaluation_echec() -> Result<(), BenchmarkError> {
-        // Benchmark do_evaluation in case of one echec.
+    fn do_evaluation_failure() -> Result<(), BenchmarkError> {
+        // Benchmarking do_evaluation in case of a single failure.
         CurrentPoolIndex::<T>::put(0);
         frame_system::pallet::Pallet::<T>::set_block_number(1u32.into());
         let idty = T::IdtyIndex::one();
diff --git a/pallets/distance/src/lib.rs b/pallets/distance/src/lib.rs
index 57f221fd3..f42651850 100644
--- a/pallets/distance/src/lib.rs
+++ b/pallets/distance/src/lib.rs
@@ -77,7 +77,7 @@ pub mod pallet {
         type EvaluationPrice: Get<
             <Self::Currency as frame_support::traits::Currency<Self::AccountId>>::Balance,
         >;
-        /// Evaluation period in block numbers.
+        /// Evaluation period number of blocks.
         /// As the evaluation is done using 3 pools,
         /// the evaluation will take 3 * EvaluationPeriod.
         #[pallet::constant]
@@ -554,7 +554,7 @@ pub mod pallet {
                                 <T as Config>::EvaluationPrice::get(),
                             );
                             weight = weight.saturating_add(
-                                <T as pallet::Config>::WeightInfo::do_evaluation_echec()
+                                <T as pallet::Config>::WeightInfo::do_evaluation_failure()
                                     .saturating_sub(
                                         <T as pallet::Config>::WeightInfo::do_evaluation_overhead(),
                                     ),
@@ -582,7 +582,7 @@ pub mod pallet {
                             );
                             Self::deposit_event(Event::EvaluatedInvalid { idty_index: idty });
                             weight = weight.saturating_add(
-                                <T as pallet::Config>::WeightInfo::do_evaluation_echec()
+                                <T as pallet::Config>::WeightInfo::do_evaluation_failure()
                                     .saturating_sub(
                                         <T as pallet::Config>::WeightInfo::do_evaluation_overhead(),
                                     ),
diff --git a/pallets/distance/src/weights.rs b/pallets/distance/src/weights.rs
index a7c65b749..93b5a5aae 100644
--- a/pallets/distance/src/weights.rs
+++ b/pallets/distance/src/weights.rs
@@ -27,7 +27,7 @@ pub trait WeightInfo {
     fn on_initialize_overhead() -> Weight;
     fn do_evaluation_overhead() -> Weight;
     fn do_evaluation_success() -> Weight;
-    fn do_evaluation_echec() -> Weight;
+    fn do_evaluation_failure() -> Weight;
     fn on_finalize() -> Weight;
 }
 
@@ -106,7 +106,7 @@ impl WeightInfo for () {
             .saturating_add(RocksDbWeight::get().writes(1))
     }
 
-    fn do_evaluation_echec() -> Weight {
+    fn do_evaluation_failure() -> Weight {
         // Proof Size summary in bytes:
         //  Measured:  `612 + i * (10 ±0)`
         //  Estimated: `2095 + i * (10 ±0)`
diff --git a/runtime/common/src/weights/pallet_distance.rs b/runtime/common/src/weights/pallet_distance.rs
index 38d7b587a..4637ced54 100644
--- a/runtime/common/src/weights/pallet_distance.rs
+++ b/runtime/common/src/weights/pallet_distance.rs
@@ -211,7 +211,7 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> {
 	/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
 	/// Storage: `Distance::EvaluationBlock` (r:0 w:1)
 	/// Proof: `Distance::EvaluationBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
-	fn do_evaluation_echec() -> Weight {
+	fn do_evaluation_failure() -> Weight {
 		// Proof Size summary in bytes:
 		//  Measured:  `364`
 		//  Estimated: `3829`
-- 
GitLab