From 51e3068808fb58f30ffb16bfdaa81d0890f98fd8 Mon Sep 17 00:00:00 2001 From: librelois Date: Mon, 31 Jul 2023 16:19:43 +0200 Subject: [PATCH] fix some warnings --- pallets/maintenance-mode/src/types.rs | 2 +- pallets/randomness/src/benchmarks.rs | 4 ++-- primitives/nimbus-primitives/src/lib.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pallets/maintenance-mode/src/types.rs b/pallets/maintenance-mode/src/types.rs index cdef7f3..9ad2bb8 100644 --- a/pallets/maintenance-mode/src/types.rs +++ b/pallets/maintenance-mode/src/types.rs @@ -119,7 +119,7 @@ impl frame_support::traits::TryState> fn try_state( _: BlockNumberOf, _: frame_support::traits::TryStateSelect, - ) -> Result<(), &'static str> { + ) -> Result<(), sp_runtime::DispatchError> { Ok(()) } } diff --git a/pallets/randomness/src/benchmarks.rs b/pallets/randomness/src/benchmarks.rs index 1660983..8189305 100644 --- a/pallets/randomness/src/benchmarks.rs +++ b/pallets/randomness/src/benchmarks.rs @@ -141,9 +141,9 @@ benchmarks! { } verify { // verify VrfOutput was inserted into storage as expected - let pubkey = sp_consensus_vrf::schnorrkel::PublicKey::from_bytes(vrf_id.as_slice()) + let pubkey = sp_consensus_babe::schnorrkel::PublicKey::from_bytes(vrf_id.as_slice()) .expect("Expect VrfId is valid schnorrkel Public key"); - let vrf_output: sp_consensus_vrf::schnorrkel::Randomness = vrf_pre_digest.vrf_output + let vrf_output: sp_consensus_babe::schnorrkel::Randomness = vrf_pre_digest.vrf_output .attach_input_hash(&pubkey, transcript) .ok() .map(|inout| inout.make_bytes(&session_keys_primitives::VRF_INOUT_CONTEXT)) diff --git a/primitives/nimbus-primitives/src/lib.rs b/primitives/nimbus-primitives/src/lib.rs index 15380c5..2bcf36f 100644 --- a/primitives/nimbus-primitives/src/lib.rs +++ b/primitives/nimbus-primitives/src/lib.rs @@ -26,7 +26,7 @@ use sp_runtime::generic::DigestItem; use sp_runtime::traits::BlockNumberProvider; use sp_runtime::ConsensusEngineId; #[cfg(feature = "runtime-benchmarks")] -use sp_std::vec::{self, Vec}; +use sp_std::vec::Vec; pub mod digests; mod inherents; @@ -114,7 +114,7 @@ impl SlotBeacon for IntervalBeacon { pub trait CanAuthor { #[cfg(feature = "try-runtime")] // With `try-runtime` the local author should always be able to author a block. - fn can_author(author: &AuthorId, slot: &u32) -> bool { + fn can_author(_author: &AuthorId, _slot: &u32) -> bool { true } #[cfg(not(feature = "try-runtime"))]