From 860c4d3a6847f29862b59b611f330d819eae25bb Mon Sep 17 00:00:00 2001 From: Daniel Blanco Parla Date: Wed, 18 Dec 2024 11:39:24 +0100 Subject: [PATCH] fix(validator-set): update SessionBlockManager and Heartbeat types to use BlockNumberFor for consistency --- pallets/validator-set/src/lib.rs | 38 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/pallets/validator-set/src/lib.rs b/pallets/validator-set/src/lib.rs index 1f33f57..b4bad2f 100644 --- a/pallets/validator-set/src/lib.rs +++ b/pallets/validator-set/src/lib.rs @@ -62,7 +62,7 @@ pub mod pallet { /// auto removal. type MinAuthorities: Get; - type SessionBlockManager: SessionBlockManager; + type SessionBlockManager: SessionBlockManager>; type FindAuthor: FindAuthor; @@ -266,25 +266,25 @@ pub mod pallet { } } - #[cfg(feature = "std")] - impl GenesisConfig { - /// Direct implementation of `GenesisBuild::build_storage`. - /// - /// Kept in order not to break dependency. - pub fn build_storage(&self) -> Result { - >::build_storage(self) - } - - /// Direct implementation of `GenesisBuild::assimilate_storage`. - /// - /// Kept in order not to break dependency. - pub fn assimilate_storage(&self, storage: &mut sp_runtime::Storage) -> Result<(), String> { - >::assimilate_storage(self, storage) - } - } + // #[cfg(feature = "std")] + // impl GenesisConfig { + // /// Direct implementation of `GenesisBuild::build_storage`. + // /// + // /// Kept in order not to break dependency. + // pub fn build_storage(&self) -> Result { + // >::build_storage(self) + // } + + // /// Direct implementation of `GenesisBuild::assimilate_storage`. + // /// + // /// Kept in order not to break dependency. + // pub fn assimilate_storage(&self, storage: &mut sp_runtime::Storage) -> Result<(), String> { + // >::assimilate_storage(self, storage) + // } + // } #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig { + impl BuildGenesisConfig for GenesisConfig { fn build(&self) { Pallet::::initialize_validators(self.initial_validators.clone()); MaxMissedEpochs::::put(self.max_epochs_missed.clone()); @@ -323,7 +323,7 @@ pub mod pallet { } fn ensure_unsigned_origin( - heartbeat: Heartbeat, + heartbeat: Heartbeat, T::AuthorityId>, signature: ::Signature, ) -> Result<(), ()> { let is_valid = heartbeat