Skip to content

Commit

Permalink
update client for lighthouse/spec endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
realbigsean committed Jun 2, 2021
1 parent d188557 commit 7a9b2ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions common/eth2/src/lighthouse_vc/http_client.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -211,7 +211,7 @@ impl ValidatorClientHttpClient {
}

/// `GET lighthouse/spec`
pub async fn get_lighthouse_spec(&self) -> Result<GenericResponse<ConfigAndPreset>, Error> {
pub async fn get_lighthouse_spec(&self) -> Result<GenericResponse<StandardConfig>, Error> {
let mut path = self.server.full.clone();

path.path_segments_mut()
Expand Down
6 changes: 4 additions & 2 deletions validator_client/src/http_api/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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>(&E::default_spec());
let expected = StandardConfig::from_chain_spec::<E>(&E::default_spec());

assert_eq!(result, expected);

Expand Down

0 comments on commit 7a9b2ac

Please sign in to comment.