chore: reorder super (#12380)

This commit is contained in:
Matthias Seitz
2024-11-07 16:42:37 +01:00
committed by GitHub
parent 190a1d8bb4
commit cf095a7536
11 changed files with 15 additions and 30 deletions

View File

@ -438,11 +438,10 @@ impl StorageInner {
#[cfg(test)]
mod tests {
use super::*;
use reth_chainspec::{ChainHardforks, ChainSpec, EthereumHardfork, ForkCondition};
use reth_primitives::Transaction;
use super::*;
#[test]
fn test_block_hash() {
let mut storage = StorageInner::default();

View File

@ -281,9 +281,8 @@ impl EtlFile {
#[cfg(test)]
mod tests {
use alloy_primitives::{TxHash, TxNumber};
use super::*;
use alloy_primitives::{TxHash, TxNumber};
#[test]
fn etl_hashes() {

View File

@ -477,11 +477,9 @@ impl BootNode {
#[cfg(test)]
mod test {
use std::net::SocketAddrV4;
use alloy_primitives::hex;
use super::*;
use alloy_primitives::hex;
use std::net::SocketAddrV4;
const MULTI_ADDRESSES: &str = "/ip4/184.72.129.189/udp/30301/p2p/16Uiu2HAmSG2hdLwyQHQmG4bcJBgD64xnW63WMTLcrNq6KoZREfGb,/ip4/3.231.11.52/udp/30301/p2p/16Uiu2HAmMy4V8bi3XP7KDfSLQcLACSvTLroRRwEsTyFUKo8NCkkp,/ip4/54.198.153.150/udp/30301/p2p/16Uiu2HAmSVsb7MbRf1jg3Dvd6a3n5YNqKQwn1fqHCFgnbqCsFZKe,/ip4/3.220.145.177/udp/30301/p2p/16Uiu2HAm74pBDGdQ84XCZK27GRQbGFFwQ7RsSqsPwcGmCR3Cwn3B,/ip4/3.231.138.188/udp/30301/p2p/16Uiu2HAmMnTiJwgFtSVGV14ZNpwAvS1LUoF4pWWeNtURuV6C3zYB";
const BOOT_NODES_OP_MAINNET_AND_BASE_MAINNET: &[&str] = &[

View File

@ -89,13 +89,11 @@ impl MustNotIncludeKeys {
#[cfg(test)]
mod tests {
use super::*;
use crate::NetworkStackId;
use alloy_rlp::Bytes;
use discv5::enr::{CombinedKey, Enr};
use crate::NetworkStackId;
use super::*;
#[test]
fn must_not_include_key_filter() {
// rig test

View File

@ -631,14 +631,13 @@ impl NetworkMode {
#[cfg(test)]
mod tests {
use std::sync::Arc;
use super::*;
use rand::thread_rng;
use reth_chainspec::{Chain, MAINNET};
use reth_dns_discovery::tree::LinkEntry;
use reth_primitives::ForkHash;
use reth_provider::test_utils::NoopProvider;
use std::sync::Arc;
fn builder() -> NetworkConfigBuilder {
let secret_key = SecretKey::new(&mut thread_rng());

View File

@ -1343,16 +1343,13 @@ struct TxFetcherSearchDurations {
#[cfg(test)]
mod test {
use std::{collections::HashSet, str::FromStr};
use super::*;
use crate::transactions::tests::{default_cache, new_mock_session};
use alloy_primitives::{hex, B256};
use alloy_rlp::Decodable;
use derive_more::IntoIterator;
use reth_primitives::TransactionSigned;
use crate::transactions::tests::{default_cache, new_mock_session};
use super::*;
use std::{collections::HashSet, str::FromStr};
#[derive(IntoIterator)]
struct TestValidAnnouncementData(Vec<(TxHash, Option<(u8, usize)>)>);

View File

@ -336,7 +336,6 @@ impl FilterAnnouncement for EthMessageFilter {
#[cfg(test)]
mod test {
use super::*;
use alloy_primitives::B256;
use reth_eth_wire::{NewPooledTransactionHashes66, NewPooledTransactionHashes68};
use std::{collections::HashMap, str::FromStr};

View File

@ -231,12 +231,11 @@ impl TryFrom<&Enr<secp256k1::SecretKey>> for NodeRecord {
#[cfg(test)]
mod tests {
use super::*;
use alloy_rlp::Decodable;
use rand::{thread_rng, Rng, RngCore};
use std::net::Ipv6Addr;
use super::*;
#[test]
fn test_mapped_ipv6() {
let mut rng = thread_rng();

View File

@ -136,10 +136,9 @@ pub enum IpcError {
#[cfg(test)]
mod tests {
use interprocess::local_socket::ListenerOptions;
use super::*;
use crate::server::dummy_name;
use interprocess::local_socket::ListenerOptions;
#[tokio::test]
async fn test_connect() {

View File

@ -1936,15 +1936,14 @@ impl SenderInfo {
#[cfg(test)]
mod tests {
use alloy_primitives::address;
use reth_primitives::TxType;
use super::*;
use crate::{
test_utils::{MockOrdering, MockTransaction, MockTransactionFactory, MockTransactionSet},
traits::TransactionOrigin,
SubPoolLimit,
};
use alloy_primitives::address;
use reth_primitives::TxType;
#[test]
fn test_insert_blob() {

View File

@ -347,6 +347,7 @@ impl HashedStorageSorted {
#[cfg(test)]
mod tests {
use super::*;
use alloy_primitives::Bytes;
use revm::{
db::{
@ -356,8 +357,6 @@ mod tests {
primitives::{AccountInfo, Bytecode},
};
use super::*;
#[test]
fn hashed_state_wiped_extension() {
let hashed_address = B256::default();