Skip to content

Commit

Permalink
make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Rjected committed Jan 10, 2023
1 parent 96631b0 commit c97b65a
Showing 1 changed file with 7 additions and 23 deletions.
30 changes: 7 additions & 23 deletions crates/tests/src/sync.rs
Original file line number Diff line number Diff line change
@@ -1,32 +1,16 @@
use enr::{k256::ecdsa::SigningKey, Enr, EnrPublicKey};
use ethers_core::{
types::{Address, Block, Bytes, U64},
utils::{ChainConfig, CliqueConfig, Genesis, GenesisAccount, Geth},
};
use enr::k256::ecdsa::SigningKey;
use ethers_core::types::U64;
use ethers_middleware::SignerMiddleware;
use ethers_providers::{Http, Middleware, Provider};
use ethers_signers::{LocalWallet, Signer};
use futures::StreamExt;
use reth_discv4::{bootnodes::mainnet_nodes, Discv4Config};
use reth_eth_wire::{DisconnectReason, EthVersion, Status};
use reth_interfaces::{
p2p::headers::client::{HeadersClient, HeadersRequest},
sync::{SyncState, SyncStateUpdater},
};
use reth_net_common::ban_list::BanList;
use reth_net_test_utils::{
create_new_geth, enr_to_peer_id, unused_port, unused_tcp_udp, NetworkEventStream, PeerConfig,
Testnet, GETH_TIMEOUT,
};
use reth_network::{NetworkConfig, NetworkEvent, NetworkHandle, NetworkManager, PeersConfig};
use reth_primitives::{
proofs::genesis_state_root, Chain, ForkHash, ForkId, Header, HeadersDirection, NodeRecord,
PeerId, H160, H256, INITIAL_BASE_FEE,
};

use reth_net_test_utils::{create_new_geth, enr_to_peer_id, unused_tcp_udp, GETH_TIMEOUT};
use reth_network::{NetworkConfig, NetworkEvent, NetworkManager};
use reth_primitives::{PeerId, H256};
use reth_provider::test_utils::NoopProvider;
use secp256k1::SecretKey;
use std::{
collections::{HashMap, HashSet},
io::{BufRead, BufReader},
net::SocketAddr,
sync::Arc,
Expand Down Expand Up @@ -61,7 +45,7 @@ async fn sync_from_clique_geth() {

// create a pre-funded geth and turn on p2p
let genesis = genesis_funded(chain_id, wallet.address());
println!("genesis: {:#?}", genesis);
println!("genesis: {genesis:#?}");
let geth = geth.genesis(genesis.clone()).chain_id(chain_id).disable_discovery().insecure_unlock();

// geth starts in dev mode, we can spawn it, mine blocks, and shut it down
Expand Down

0 comments on commit c97b65a

Please sign in to comment.