mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 02:49:55 +00:00
chore: reorder super (#12380)
This commit is contained in:
@ -438,11 +438,10 @@ impl StorageInner {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
use super::*;
|
||||||
use reth_chainspec::{ChainHardforks, ChainSpec, EthereumHardfork, ForkCondition};
|
use reth_chainspec::{ChainHardforks, ChainSpec, EthereumHardfork, ForkCondition};
|
||||||
use reth_primitives::Transaction;
|
use reth_primitives::Transaction;
|
||||||
|
|
||||||
use super::*;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_block_hash() {
|
fn test_block_hash() {
|
||||||
let mut storage = StorageInner::default();
|
let mut storage = StorageInner::default();
|
||||||
|
|||||||
@ -281,9 +281,8 @@ impl EtlFile {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use alloy_primitives::{TxHash, TxNumber};
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
use alloy_primitives::{TxHash, TxNumber};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn etl_hashes() {
|
fn etl_hashes() {
|
||||||
|
|||||||
@ -477,11 +477,9 @@ impl BootNode {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use std::net::SocketAddrV4;
|
|
||||||
|
|
||||||
use alloy_primitives::hex;
|
|
||||||
|
|
||||||
use super::*;
|
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 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] = &[
|
const BOOT_NODES_OP_MAINNET_AND_BASE_MAINNET: &[&str] = &[
|
||||||
|
|||||||
@ -89,13 +89,11 @@ impl MustNotIncludeKeys {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
use crate::NetworkStackId;
|
||||||
use alloy_rlp::Bytes;
|
use alloy_rlp::Bytes;
|
||||||
use discv5::enr::{CombinedKey, Enr};
|
use discv5::enr::{CombinedKey, Enr};
|
||||||
|
|
||||||
use crate::NetworkStackId;
|
|
||||||
|
|
||||||
use super::*;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn must_not_include_key_filter() {
|
fn must_not_include_key_filter() {
|
||||||
// rig test
|
// rig test
|
||||||
|
|||||||
@ -631,14 +631,13 @@ impl NetworkMode {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use std::sync::Arc;
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use rand::thread_rng;
|
use rand::thread_rng;
|
||||||
use reth_chainspec::{Chain, MAINNET};
|
use reth_chainspec::{Chain, MAINNET};
|
||||||
use reth_dns_discovery::tree::LinkEntry;
|
use reth_dns_discovery::tree::LinkEntry;
|
||||||
use reth_primitives::ForkHash;
|
use reth_primitives::ForkHash;
|
||||||
use reth_provider::test_utils::NoopProvider;
|
use reth_provider::test_utils::NoopProvider;
|
||||||
|
use std::sync::Arc;
|
||||||
|
|
||||||
fn builder() -> NetworkConfigBuilder {
|
fn builder() -> NetworkConfigBuilder {
|
||||||
let secret_key = SecretKey::new(&mut thread_rng());
|
let secret_key = SecretKey::new(&mut thread_rng());
|
||||||
|
|||||||
@ -1343,16 +1343,13 @@ struct TxFetcherSearchDurations {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod 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_primitives::{hex, B256};
|
||||||
use alloy_rlp::Decodable;
|
use alloy_rlp::Decodable;
|
||||||
use derive_more::IntoIterator;
|
use derive_more::IntoIterator;
|
||||||
use reth_primitives::TransactionSigned;
|
use reth_primitives::TransactionSigned;
|
||||||
|
use std::{collections::HashSet, str::FromStr};
|
||||||
use crate::transactions::tests::{default_cache, new_mock_session};
|
|
||||||
|
|
||||||
use super::*;
|
|
||||||
|
|
||||||
#[derive(IntoIterator)]
|
#[derive(IntoIterator)]
|
||||||
struct TestValidAnnouncementData(Vec<(TxHash, Option<(u8, usize)>)>);
|
struct TestValidAnnouncementData(Vec<(TxHash, Option<(u8, usize)>)>);
|
||||||
|
|||||||
@ -336,7 +336,6 @@ impl FilterAnnouncement for EthMessageFilter {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
use alloy_primitives::B256;
|
use alloy_primitives::B256;
|
||||||
use reth_eth_wire::{NewPooledTransactionHashes66, NewPooledTransactionHashes68};
|
use reth_eth_wire::{NewPooledTransactionHashes66, NewPooledTransactionHashes68};
|
||||||
use std::{collections::HashMap, str::FromStr};
|
use std::{collections::HashMap, str::FromStr};
|
||||||
|
|||||||
@ -231,12 +231,11 @@ impl TryFrom<&Enr<secp256k1::SecretKey>> for NodeRecord {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
use super::*;
|
||||||
use alloy_rlp::Decodable;
|
use alloy_rlp::Decodable;
|
||||||
use rand::{thread_rng, Rng, RngCore};
|
use rand::{thread_rng, Rng, RngCore};
|
||||||
use std::net::Ipv6Addr;
|
use std::net::Ipv6Addr;
|
||||||
|
|
||||||
use super::*;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_mapped_ipv6() {
|
fn test_mapped_ipv6() {
|
||||||
let mut rng = thread_rng();
|
let mut rng = thread_rng();
|
||||||
|
|||||||
@ -136,10 +136,9 @@ pub enum IpcError {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use interprocess::local_socket::ListenerOptions;
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::server::dummy_name;
|
use crate::server::dummy_name;
|
||||||
|
use interprocess::local_socket::ListenerOptions;
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_connect() {
|
async fn test_connect() {
|
||||||
|
|||||||
@ -1936,15 +1936,14 @@ impl SenderInfo {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use alloy_primitives::address;
|
|
||||||
use reth_primitives::TxType;
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::{
|
use crate::{
|
||||||
test_utils::{MockOrdering, MockTransaction, MockTransactionFactory, MockTransactionSet},
|
test_utils::{MockOrdering, MockTransaction, MockTransactionFactory, MockTransactionSet},
|
||||||
traits::TransactionOrigin,
|
traits::TransactionOrigin,
|
||||||
SubPoolLimit,
|
SubPoolLimit,
|
||||||
};
|
};
|
||||||
|
use alloy_primitives::address;
|
||||||
|
use reth_primitives::TxType;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_insert_blob() {
|
fn test_insert_blob() {
|
||||||
|
|||||||
@ -347,6 +347,7 @@ impl HashedStorageSorted {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
use super::*;
|
||||||
use alloy_primitives::Bytes;
|
use alloy_primitives::Bytes;
|
||||||
use revm::{
|
use revm::{
|
||||||
db::{
|
db::{
|
||||||
@ -356,8 +357,6 @@ mod tests {
|
|||||||
primitives::{AccountInfo, Bytecode},
|
primitives::{AccountInfo, Bytecode},
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::*;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn hashed_state_wiped_extension() {
|
fn hashed_state_wiped_extension() {
|
||||||
let hashed_address = B256::default();
|
let hashed_address = B256::default();
|
||||||
|
|||||||
Reference in New Issue
Block a user