Update registry to set the correct network endpoints
Now that the Nodes have their network endpoints set,
those endpoints should be added to the registry.
@@ -49,19 +49,19 @@ impl Network {
registry_info.push((
node.node_id().to_string(),
public_key,
- format!("tcp://localhost:8{:0>3}", i),
+ node.network_endpoints().to_vec(),
));
self.nodes.push(node);
}
for node in &self.nodes {
let registry_writer = node.registry_writer();
- for (node_id, pub_key, endpoint) in &registry_info {
+ for (node_id, pub_key, endpoints) in &registry_info {
registry_writer
.add_node(
RegistryNode::builder(node_id)
.with_display_name(node_id)
- .with_endpoint(endpoint)
+ .with_endpoints(endpoints.to_vec())
.with_key(pub_key.as_hex())
.build()
.map_err(|e| InternalError::from_source(Box::new(e)))?,
