Restore workspace-wide clippy

Fixes accumulated errors in the Substrate code. Modifies the runtime build to
work with a modern clippy. Removes e2e tests from the workspace.
This commit is contained in:
Luke Parker
2025-01-19 02:27:35 -05:00
parent 47560fa9a9
commit 0b30ac175e
22 changed files with 3329 additions and 295 deletions

View File

@@ -8,12 +8,13 @@ use blake2::{
use scale::Encode;
use serai_client::{
primitives::{Amount, NetworkId, Coin, Balance, BlockHash, SeraiAddress},
primitives::{BlockHash, NetworkId, Coin, Amount, Balance, SeraiAddress},
coins::CoinsEvent,
validator_sets::primitives::Session,
in_instructions::{
primitives::{InInstruction, InInstructionWithBalance, Batch},
InInstructionsEvent,
},
coins::CoinsEvent,
Serai,
};
@@ -32,9 +33,13 @@ serai_test!(
let amount = Amount(OsRng.next_u64().saturating_add(1));
let balance = Balance { coin, amount };
let mut external_network_block_hash = BlockHash([0; 32]);
OsRng.fill_bytes(&mut external_network_block_hash.0);
let batch = Batch {
network,
id,
external_network_block_hash,
instructions: vec![InInstructionWithBalance {
instruction: InInstruction::Transfer(address),
balance,
@@ -51,8 +56,11 @@ serai_test!(
batches,
vec![InInstructionsEvent::Batch {
network,
publishing_session: Session(0),
id,
instructions_hash: Blake2b::<U32>::digest(batch.instructions.encode()).into(),
external_network_block_hash,
in_instructions_hash: Blake2b::<U32>::digest(batch.instructions.encode()).into(),
in_instruction_results: bitvec::bitvec![u8, bitvec::order::Lsb0; 1; 1],
}]
);
}