mirror of
https://github.com/Cuprate/cuprate.git
synced 2024-11-16 15:58:17 +00:00
fmt & clippy
This commit is contained in:
parent
7ae07da6a7
commit
42f74c76c4
4 changed files with 3 additions and 12 deletions
|
@ -222,7 +222,6 @@ pub async fn ping<N: NetworkZone>(addr: N::Addr) -> Result<u64, HandshakeError>
|
|||
}
|
||||
|
||||
/// This function completes a handshake with the requested peer.
|
||||
#[expect(clippy::too_many_arguments)]
|
||||
async fn handshake<Z: NetworkZone, AdrBook, CSync, ProtoHdlr, BrdcstStrmMkr, BrdcstStrm>(
|
||||
req: DoHandshakeRequest<Z>,
|
||||
|
||||
|
|
|
@ -20,8 +20,7 @@ use tower::{service_fn, Service};
|
|||
use cuprate_fixed_bytes::ByteArrayVec;
|
||||
use cuprate_p2p_core::{
|
||||
client::{mock_client, Client, InternalPeerID, PeerInformation},
|
||||
ClearNet, ConnectionDirection, PeerRequest, PeerResponse, ProtocolRequest,
|
||||
ProtocolResponse,
|
||||
ClearNet, ConnectionDirection, PeerRequest, PeerResponse, ProtocolRequest, ProtocolResponse,
|
||||
};
|
||||
use cuprate_pruning::PruningSeed;
|
||||
use cuprate_types::{BlockCompleteEntry, TransactionBlobs};
|
||||
|
@ -52,13 +51,9 @@ proptest! {
|
|||
timeout(Duration::from_secs(600), async move {
|
||||
let client_pool = ClientPool::new();
|
||||
|
||||
let mut peer_ids = Vec::with_capacity(peers);
|
||||
|
||||
for _ in 0..peers {
|
||||
let client = mock_block_downloader_client(Arc::clone(&blockchain));
|
||||
|
||||
peer_ids.push(client.info.id);
|
||||
|
||||
client_pool.add_new_client(client);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ pub(crate) const MAX_SEED_CONNECTIONS: usize = 3;
|
|||
/// The timeout for when we fail to find a peer to connect to.
|
||||
pub(crate) const OUTBOUND_CONNECTION_ATTEMPT_TIMEOUT: Duration = Duration::from_secs(5);
|
||||
|
||||
#[allow(dead_code)]
|
||||
/// The durations of a short ban.
|
||||
#[cfg_attr(not(test), expect(dead_code))]
|
||||
pub(crate) const SHORT_BAN: Duration = Duration::from_secs(60 * 10);
|
||||
|
||||
/// The durations of a medium ban.
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use futures::FutureExt;
|
||||
use tokio::{
|
||||
sync::mpsc,
|
||||
task::JoinSet,
|
||||
};
|
||||
use tokio::{sync::mpsc, task::JoinSet};
|
||||
use tower::{buffer::Buffer, util::BoxCloneService, Service, ServiceExt};
|
||||
use tracing::{instrument, Instrument, Span};
|
||||
|
||||
|
|
Loading…
Reference in a new issue