mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Resolve clippy errors from recent merges
This commit is contained in:
@@ -20,7 +20,7 @@ use sp_runtime::{
|
||||
};
|
||||
|
||||
use serai_primitives::*;
|
||||
use validator_sets::{primitives::MAX_KEY_SHARES_PER_SET, MembershipProof};
|
||||
use validator_sets::{primitives::MAX_KEY_SHARES_PER_SET_U32, MembershipProof};
|
||||
|
||||
pub use crate as economic_security;
|
||||
pub use coins_pallet as coins;
|
||||
@@ -32,7 +32,7 @@ pub use validator_sets_pallet as validator_sets;
|
||||
|
||||
type Block = frame_system::mocking::MockBlock<Test>;
|
||||
// Maximum number of authorities per session.
|
||||
pub type MaxAuthorities = ConstU32<{ MAX_KEY_SHARES_PER_SET }>;
|
||||
pub type MaxAuthorities = ConstU32<{ MAX_KEY_SHARES_PER_SET_U32 }>;
|
||||
|
||||
pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4);
|
||||
pub const BABE_GENESIS_EPOCH_CONFIG: sp_consensus_babe::BabeEpochConfiguration =
|
||||
@@ -183,9 +183,16 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities {
|
||||
.assimilate_storage(&mut t)
|
||||
.unwrap();
|
||||
|
||||
#[expect(unused_variables, unreachable_code, clippy::diverging_sub_expression)]
|
||||
validator_sets::GenesisConfig::<Test> {
|
||||
networks,
|
||||
participants: genesis_participants().into_iter().map(|p| p.public()).collect(),
|
||||
participants: genesis_participants()
|
||||
.into_iter()
|
||||
.map(|p| {
|
||||
let keys: validator_sets_pallet::AllEmbeddedEllipticCurveKeysAtGenesis = todo!("TODO");
|
||||
(p.public(), keys)
|
||||
})
|
||||
.collect(),
|
||||
}
|
||||
.assimilate_storage(&mut t)
|
||||
.unwrap();
|
||||
|
||||
@@ -4,7 +4,6 @@ use frame_support::traits::Hooks;
|
||||
use frame_system::RawOrigin;
|
||||
|
||||
use sp_core::{sr25519::Signature, Pair as PairTrait};
|
||||
use sp_runtime::BoundedVec;
|
||||
|
||||
use validator_sets::primitives::KeyPair;
|
||||
use serai_primitives::{
|
||||
@@ -16,8 +15,8 @@ fn set_keys_for_session(network: ExternalNetworkId) {
|
||||
ValidatorSets::set_keys(
|
||||
RawOrigin::None.into(),
|
||||
network,
|
||||
BoundedVec::new(),
|
||||
KeyPair(insecure_pair_from_name("Alice").public(), vec![].try_into().unwrap()),
|
||||
vec![].try_into().unwrap(),
|
||||
Signature([0u8; 64]),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user