Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Remove HostInfo::next_nonce (#8644)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaka authored and 5chdn committed May 18, 2018
1 parent d193436 commit 6552256
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 7 additions & 5 deletions util/network-devp2p/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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
}
Expand Down
2 changes: 0 additions & 2 deletions util/network/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6552256

Please sign in to comment.