mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 04:01:10 +00:00
Split SolutionImprovementThresholds into two types (#11221)
* Splitting `SolutionImprovementThreshold` in 2 One for Signed phase and one for Unsigned phase. * Adding some tests * Fixes after code review. - Removing `GetDefault`. - Shorter naming. - More explicit test.
This commit is contained in:
@@ -102,8 +102,8 @@
|
||||
//! valid if propagated, and it acts similar to an inherent.
|
||||
//!
|
||||
//! Validators will only submit solutions if the one that they have computed is sufficiently better
|
||||
//! than the best queued one (see [`pallet::Config::SolutionImprovementThreshold`]) and will limit
|
||||
//! the weight of the solution to [`pallet::Config::MinerMaxWeight`].
|
||||
//! than the best queued one (see [`pallet::Config::BetterUnsignedThreshold`]) and will limit the
|
||||
//! weight of the solution to [`pallet::Config::MinerMaxWeight`].
|
||||
//!
|
||||
//! The unsigned phase can be made passive depending on how the previous signed phase went, by
|
||||
//! setting the first inner value of [`Phase`] to `false`. For now, the signed phase is always
|
||||
@@ -585,9 +585,14 @@ pub mod pallet {
|
||||
type SignedPhase: Get<Self::BlockNumber>;
|
||||
|
||||
/// The minimum amount of improvement to the solution score that defines a solution as
|
||||
/// "better" (in any phase).
|
||||
/// "better" in the Signed phase.
|
||||
#[pallet::constant]
|
||||
type SolutionImprovementThreshold: Get<Perbill>;
|
||||
type BetterSignedThreshold: Get<Perbill>;
|
||||
|
||||
/// The minimum amount of improvement to the solution score that defines a solution as
|
||||
/// "better" in the Unsigned phase.
|
||||
#[pallet::constant]
|
||||
type BetterUnsignedThreshold: Get<Perbill>;
|
||||
|
||||
/// The repeat threshold of the offchain worker.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user