mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 17:26:04 +00:00
Fix compile bug in node_test_rig
This commit is contained in:
@@ -42,11 +42,15 @@ impl<T: BeaconChainTypes> LocalBeaconNode<Client<T>> {
|
|||||||
/// Returns a `RemoteBeaconNode` that can connect to `self`. Useful for testing the node as if
|
/// Returns a `RemoteBeaconNode` that can connect to `self`. Useful for testing the node as if
|
||||||
/// it were external this process.
|
/// it were external this process.
|
||||||
pub fn remote_node(&self) -> Result<RemoteBeaconNode<T::EthSpec>, String> {
|
pub fn remote_node(&self) -> Result<RemoteBeaconNode<T::EthSpec>, String> {
|
||||||
Ok(RemoteBeaconNode::new(
|
let socket_addr = self
|
||||||
self.client
|
.client
|
||||||
.http_listen_addr()
|
.http_listen_addr()
|
||||||
.ok_or_else(|| "A remote beacon node must have a http server".to_string())?,
|
.ok_or_else(|| "A remote beacon node must have a http server".to_string())?;
|
||||||
)?)
|
Ok(RemoteBeaconNode::new(format!(
|
||||||
|
"http://{}:{}",
|
||||||
|
socket_addr.ip(),
|
||||||
|
socket_addr.port()
|
||||||
|
))?)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user