Skip to content

Commit

Permalink
Remove HostInfo::next_nonce (openethereum#8644)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaka committed May 21, 2018
1 parent c6dcf62 commit b18b4bf
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 b18b4bf

Please sign in to comment.