fix: allow(dead_code) on some protocol version functions

This commit is contained in:
teor 2020-07-29 11:27:36 +10:00 committed by Deirdre Connolly
parent 0ef8e38266
commit 536668f993
2 changed files with 3 additions and 0 deletions

View File

@ -79,12 +79,14 @@ impl Builder {
}
/// Configure the codec for the given [`Version`].
#[allow(dead_code)]
pub fn for_version(mut self, version: Version) -> Self {
self.version = version;
self
}
/// Configure the codec's maximum accepted payload size, in bytes.
#[allow(dead_code)]
pub fn with_max_body_len(mut self, len: usize) -> Self {
self.max_len = len;
self

View File

@ -59,6 +59,7 @@ impl Version {
/// Returns the current minimum protocol version for `network` and `height`.
///
/// Returns None if the network has no branch id at this height.
#[allow(dead_code)]
pub fn current_min(network: Network, height: BlockHeight) -> Version {
let network_upgrade = NetworkUpgrade::current(network, height);
Version::min_for_upgrade(network, network_upgrade)