From 7a9b2ac6be8962d398ff604c7c26e6913e10eb4f Mon Sep 17 00:00:00 2001 From: realbigsean Date: Wed, 2 Jun 2021 14:56:26 -0400 Subject: [PATCH] update client for `lighthouse/spec` endpoint --- common/eth2/src/lighthouse_vc/http_client.rs | 4 ++-- validator_client/src/http_api/tests.rs | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/common/eth2/src/lighthouse_vc/http_client.rs b/common/eth2/src/lighthouse_vc/http_client.rs index c6a12350987..84142fe1ca9 100644 --- a/common/eth2/src/lighthouse_vc/http_client.rs +++ b/common/eth2/src/lighthouse_vc/http_client.rs @@ -1,4 +1,4 @@ -use super::{types::*, PK_LEN, SECRET_PREFIX}; +use super::{types::Config as StandardConfig, types::*, PK_LEN, SECRET_PREFIX}; use crate::Error; use account_utils::ZeroizeString; use bytes::Bytes; @@ -211,7 +211,7 @@ impl ValidatorClientHttpClient { } /// `GET lighthouse/spec` - pub async fn get_lighthouse_spec(&self) -> Result, Error> { + pub async fn get_lighthouse_spec(&self) -> Result, Error> { let mut path = self.server.full.clone(); path.path_segments_mut() diff --git a/validator_client/src/http_api/tests.rs b/validator_client/src/http_api/tests.rs index a1fa4d463fe..a8fcb0cbbe8 100644 --- a/validator_client/src/http_api/tests.rs +++ b/validator_client/src/http_api/tests.rs @@ -11,7 +11,9 @@ use account_utils::{ }; use deposit_contract::decode_eth1_tx_data; use environment::null_logger; -use eth2::lighthouse_vc::{http_client::ValidatorClientHttpClient, types::*}; +use eth2::lighthouse_vc::{ + http_client::ValidatorClientHttpClient, types::Config as StandardConfig, types::*, +}; use eth2_keystore::KeystoreBuilder; use parking_lot::RwLock; use sensitive_url::SensitiveUrl; @@ -150,7 +152,7 @@ impl ApiTester { pub async fn test_get_lighthouse_spec(self) -> Self { let result = self.client.get_lighthouse_spec().await.unwrap().data; - let expected = ConfigAndPreset::from_chain_spec::(&E::default_spec()); + let expected = StandardConfig::from_chain_spec::(&E::default_spec()); assert_eq!(result, expected);