mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
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:
@@ -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],
|
||||
}]
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user