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

fix unset CurrentPoolIndex during first evaluation period

parent c521f5e1
No related branches found
No related tags found
1 merge request!284Fix #255 distance reading discarded state
......@@ -81,10 +81,13 @@ pub use traits::*;
pub use types::*;
pub use weights::WeightInfo;
use frame_support::traits::{
use frame_support::{
traits::{
fungible::{self, hold, Credit, Mutate, MutateHold},
tokens::Precision,
OnUnbalanced, StorageVersion,
},
DefaultNoBound,
};
use sp_distance::{InherentError, INHERENT_IDENTIFIER};
use sp_inherents::{InherentData, InherentIdentifier};
......@@ -288,6 +291,19 @@ pub mod pallet {
TargetMustBeUnvalidated,
}
#[pallet::genesis_config]
#[derive(DefaultNoBound)]
pub struct GenesisConfig<T: Config> {
pub _config: core::marker::PhantomData<T>,
}
#[pallet::genesis_build]
impl<T: Config> BuildGenesisConfig for GenesisConfig<T> {
fn build(&self) {
CurrentPoolIndex::<T>::put(0u32);
}
}
#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
fn on_initialize(block: BlockNumberFor<T>) -> Weight
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment