Adapt shard to use hyper+soketto instead

This commit is contained in:
James Wilson
2021-07-23 17:07:29 +01:00
parent 480abd1e49
commit cf0e424803
8 changed files with 86 additions and 361 deletions
-1
View File
@@ -30,7 +30,6 @@ structopt = "0.3.21"
thiserror = "1.0.25"
tokio = { version = "1.7.0", features = ["full"] }
tokio-util = { version = "0.6", features = ["compat"] }
warp = "0.3.1"
[dev-dependencies]
criterion = { version = "0.3.4", features = ["async", "async_tokio"] }
@@ -36,7 +36,7 @@ pub enum FromShardWebsocket {
/// Tell the aggregator about a new node.
Add {
local_id: ShardNodeId,
ip: Option<std::net::IpAddr>,
ip: std::net::IpAddr,
node: common::node_types::NodeDetails,
genesis_hash: common::node_types::BlockHash,
},
@@ -277,7 +277,7 @@ impl InnerLoop {
// Ask for the grographical location of the node.
// Currently we only geographically locate IPV4 addresses so ignore IPV6.
if let Some(IpAddr::V4(ip_v4)) = ip {
if let IpAddr::V4(ip_v4) = ip {
let _ = self.tx_to_locator.unbounded_send((node_id, ip_v4));
}
}