Cleanup devp2p unused interface fn

This commit is contained in:
draganrakita
2020-12-17 12:57:34 +01:00
committed by rakita
parent a6bd3516e0
commit f723e288c3
6 changed files with 7 additions and 41 deletions

View File

@@ -320,9 +320,6 @@ pub trait NetworkContext {
/// Returns whether the given peer ID is a reserved peer.
fn is_reserved_peer(&self, peer: PeerId) -> bool;
/// Returns the size the payload shouldn't exceed
fn payload_soft_limit(&self) -> usize;
}
impl<'a, T> NetworkContext for &'a T
@@ -382,10 +379,6 @@ where
fn is_reserved_peer(&self, peer: PeerId) -> bool {
(**self).is_reserved_peer(peer)
}
fn payload_soft_limit(&self) -> usize {
(**self).payload_soft_limit()
}
}
/// Network IO protocol handler. This needs to be implemented for each new subprotocol.