Skip to content
Snippets Groups Projects
Unverified Commit c4d7a884 authored by bgallois's avatar bgallois
Browse files

rename echec in failure

parent d4d6c78e
No related branches found
No related tags found
No related merge requests found
Pipeline #36410 failed
...@@ -179,7 +179,7 @@ mod benchmarks { ...@@ -179,7 +179,7 @@ mod benchmarks {
#[benchmark] #[benchmark]
fn do_evaluation_success() -> Result<(), BenchmarkError> { 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); CurrentPoolIndex::<T>::put(0);
frame_system::pallet::Pallet::<T>::set_block_number(1u32.into()); frame_system::pallet::Pallet::<T>::set_block_number(1u32.into());
let idty = T::IdtyIndex::one(); let idty = T::IdtyIndex::one();
...@@ -216,8 +216,8 @@ mod benchmarks { ...@@ -216,8 +216,8 @@ mod benchmarks {
} }
#[benchmark] #[benchmark]
fn do_evaluation_echec() -> Result<(), BenchmarkError> { fn do_evaluation_failure() -> Result<(), BenchmarkError> {
// Benchmark do_evaluation in case of one echec. // Benchmarking do_evaluation in case of a single failure.
CurrentPoolIndex::<T>::put(0); CurrentPoolIndex::<T>::put(0);
frame_system::pallet::Pallet::<T>::set_block_number(1u32.into()); frame_system::pallet::Pallet::<T>::set_block_number(1u32.into());
let idty = T::IdtyIndex::one(); let idty = T::IdtyIndex::one();
......
...@@ -77,7 +77,7 @@ pub mod pallet { ...@@ -77,7 +77,7 @@ pub mod pallet {
type EvaluationPrice: Get< type EvaluationPrice: Get<
<Self::Currency as frame_support::traits::Currency<Self::AccountId>>::Balance, <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, /// As the evaluation is done using 3 pools,
/// the evaluation will take 3 * EvaluationPeriod. /// the evaluation will take 3 * EvaluationPeriod.
#[pallet::constant] #[pallet::constant]
...@@ -554,7 +554,7 @@ pub mod pallet { ...@@ -554,7 +554,7 @@ pub mod pallet {
<T as Config>::EvaluationPrice::get(), <T as Config>::EvaluationPrice::get(),
); );
weight = weight.saturating_add( weight = weight.saturating_add(
<T as pallet::Config>::WeightInfo::do_evaluation_echec() <T as pallet::Config>::WeightInfo::do_evaluation_failure()
.saturating_sub( .saturating_sub(
<T as pallet::Config>::WeightInfo::do_evaluation_overhead(), <T as pallet::Config>::WeightInfo::do_evaluation_overhead(),
), ),
...@@ -582,7 +582,7 @@ pub mod pallet { ...@@ -582,7 +582,7 @@ pub mod pallet {
); );
Self::deposit_event(Event::EvaluatedInvalid { idty_index: idty }); Self::deposit_event(Event::EvaluatedInvalid { idty_index: idty });
weight = weight.saturating_add( weight = weight.saturating_add(
<T as pallet::Config>::WeightInfo::do_evaluation_echec() <T as pallet::Config>::WeightInfo::do_evaluation_failure()
.saturating_sub( .saturating_sub(
<T as pallet::Config>::WeightInfo::do_evaluation_overhead(), <T as pallet::Config>::WeightInfo::do_evaluation_overhead(),
), ),
......
...@@ -27,7 +27,7 @@ pub trait WeightInfo { ...@@ -27,7 +27,7 @@ pub trait WeightInfo {
fn on_initialize_overhead() -> Weight; fn on_initialize_overhead() -> Weight;
fn do_evaluation_overhead() -> Weight; fn do_evaluation_overhead() -> Weight;
fn do_evaluation_success() -> Weight; fn do_evaluation_success() -> Weight;
fn do_evaluation_echec() -> Weight; fn do_evaluation_failure() -> Weight;
fn on_finalize() -> Weight; fn on_finalize() -> Weight;
} }
...@@ -106,7 +106,7 @@ impl WeightInfo for () { ...@@ -106,7 +106,7 @@ impl WeightInfo for () {
.saturating_add(RocksDbWeight::get().writes(1)) .saturating_add(RocksDbWeight::get().writes(1))
} }
fn do_evaluation_echec() -> Weight { fn do_evaluation_failure() -> Weight {
// Proof Size summary in bytes: // Proof Size summary in bytes:
// Measured: `612 + i * (10 ±0)` // Measured: `612 + i * (10 ±0)`
// Estimated: `2095 + i * (10 ±0)` // Estimated: `2095 + i * (10 ±0)`
......
...@@ -211,7 +211,7 @@ impl<T: frame_system::Config> pallet_distance::WeightInfo for WeightInfo<T> { ...@@ -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`) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(93), added: 2568, mode: `MaxEncodedLen`)
/// Storage: `Distance::EvaluationBlock` (r:0 w:1) /// Storage: `Distance::EvaluationBlock` (r:0 w:1)
/// Proof: `Distance::EvaluationBlock` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// 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: // Proof Size summary in bytes:
// Measured: `364` // Measured: `364`
// Estimated: `3829` // Estimated: `3829`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment