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

Remove HostInfo::next_nonce #8644

Merged
merged 1 commit into from
May 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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