Remove HostInfo::next_nonce (#8644)
This commit is contained in:
parent
d1934363e7
commit
6552256981
@ -210,6 +210,13 @@ pub struct HostInfo {
|
|||||||
pub public_endpoint: Option<NodeEndpoint>,
|
pub public_endpoint: Option<NodeEndpoint>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl HostInfo {
|
||||||
|
fn next_nonce(&mut self) -> H256 {
|
||||||
|
self.nonce = keccak(&self.nonce);
|
||||||
|
self.nonce
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl HostInfoTrait for HostInfo {
|
impl HostInfoTrait for HostInfo {
|
||||||
fn id(&self) -> &NodeId {
|
fn id(&self) -> &NodeId {
|
||||||
self.keys.public()
|
self.keys.public()
|
||||||
@ -219,11 +226,6 @@ impl HostInfoTrait for HostInfo {
|
|||||||
self.keys.secret()
|
self.keys.secret()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn next_nonce(&mut self) -> H256 {
|
|
||||||
self.nonce = keccak(&self.nonce);
|
|
||||||
self.nonce
|
|
||||||
}
|
|
||||||
|
|
||||||
fn client_version(&self) -> &str {
|
fn client_version(&self) -> &str {
|
||||||
&self.config.client_version
|
&self.config.client_version
|
||||||
}
|
}
|
||||||
|
@ -332,8 +332,6 @@ pub trait HostInfo {
|
|||||||
fn id(&self) -> &NodeId;
|
fn id(&self) -> &NodeId;
|
||||||
/// Returns secret key
|
/// Returns secret key
|
||||||
fn secret(&self) -> &Secret;
|
fn secret(&self) -> &Secret;
|
||||||
/// Increments and returns connection nonce.
|
|
||||||
fn next_nonce(&mut self) -> H256;
|
|
||||||
/// Returns the client version.
|
/// Returns the client version.
|
||||||
fn client_version(&self) -> &str;
|
fn client_version(&self) -> &str;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user