Remove HostInfo::next_nonce (#8644)

This commit is contained in:
Pierre Krieger 2018-05-18 08:04:25 +02:00 committed by Afri Schoedon
parent d1934363e7
commit 6552256981
2 changed files with 7 additions and 7 deletions

View File

@ -210,6 +210,13 @@ pub struct HostInfo {
pub public_endpoint: Option<NodeEndpoint>,
}
impl HostInfo {
fn next_nonce(&mut self) -> H256 {
self.nonce = keccak(&self.nonce);
self.nonce
}
}
impl HostInfoTrait for HostInfo {
fn id(&self) -> &NodeId {
self.keys.public()
@ -219,11 +226,6 @@ impl HostInfoTrait for HostInfo {
self.keys.secret()
}
fn next_nonce(&mut self) -> H256 {
self.nonce = keccak(&self.nonce);
self.nonce
}
fn client_version(&self) -> &str {
&self.config.client_version
}

View File

@ -332,8 +332,6 @@ pub trait HostInfo {
fn id(&self) -> &NodeId;
/// Returns secret key
fn secret(&self) -> &Secret;
/// Increments and returns connection nonce.
fn next_nonce(&mut self) -> H256;
/// Returns the client version.
fn client_version(&self) -> &str;
}