pub trait Config: Config + CreateBare<Call<Self>> {
type OffchainRepeat: Get<BlockNumberFor<Self>>;
type OffchainSolver: NposSolver<AccountId = Self::AccountId>;
type OffchainStorage: Get<bool>;
type MinerTxPriority: Get<TransactionPriority>;
type MinerPages: Get<PageIndex>;
type WeightInfo: WeightInfo;
}
Expand description
Exports of this pallet Configuration trait of this pallet.
The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.
Consequently, a runtime that wants to include this pallet must implement this trait.
Required Associated Types§
Sourcetype OffchainRepeat: Get<BlockNumberFor<Self>>
type OffchainRepeat: Get<BlockNumberFor<Self>>
The repeat threshold of the offchain worker.
For example, if it is 5
, that means that at least 5 blocks will elapse between
attempts to submit the worker’s solution.
Sourcetype OffchainSolver: NposSolver<AccountId = Self::AccountId>
type OffchainSolver: NposSolver<AccountId = Self::AccountId>
The solver used in hte offchain worker miner
Sourcetype OffchainStorage: Get<bool>
type OffchainStorage: Get<bool>
Whether the offchain worker miner would attempt to store the solutions in a local
database and reuse then. If set to false
, it will try and re-mine solutions every
time.
Sourcetype MinerTxPriority: Get<TransactionPriority>
type MinerTxPriority: Get<TransactionPriority>
The priority of the unsigned transaction submitted in the unsigned-phase
Sourcetype MinerPages: Get<PageIndex>
type MinerPages: Get<PageIndex>
The number of pages that the offchain miner will try and submit.
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Runtime weight information of this pallet.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.