This commit is contained in:
Igor Katson 2021-06-28 14:52:12 +01:00
parent c6cf9776d1
commit 5a075c8ef3
2 changed files with 2 additions and 5 deletions

View file

@ -10,12 +10,9 @@ pub enum PeerState {
} }
pub struct LivePeerState { pub struct LivePeerState {
#[allow(unused)] pub peer_id: [u8; 20],
peer_id: [u8; 20],
pub i_am_choked: bool, pub i_am_choked: bool,
#[allow(unused)]
pub peer_choked: bool, pub peer_choked: bool,
#[allow(unused)]
pub peer_interested: bool, pub peer_interested: bool,
pub outstanding_requests: Arc<Semaphore>, pub outstanding_requests: Arc<Semaphore>,
pub have_notify: Arc<Notify>, pub have_notify: Arc<Notify>,

View file

@ -13,7 +13,7 @@ use anyhow::Context;
use futures::{stream::FuturesUnordered, StreamExt}; use futures::{stream::FuturesUnordered, StreamExt};
use log::{debug, warn}; use log::{debug, warn};
use parking_lot::{Mutex, RwLock}; use parking_lot::{Mutex, RwLock};
use tokio::sync::{mpsc::Sender, Notify, Semaphore}; use tokio::sync::mpsc::Sender;
use crate::{ use crate::{
buffers::ByteString, buffers::ByteString,