From 46b8a8f6c8eb54f6a30dd0e20607f92f3690e8f3 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Mon, 14 Sep 2020 18:43:39 +1000 Subject: [PATCH] Fix test compile issues --- beacon_node/http_api/tests/tests.rs | 3 ++- beacon_node/tests/test.rs | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/beacon_node/http_api/tests/tests.rs b/beacon_node/http_api/tests/tests.rs index 4a67018724e..b287414d9a5 100644 --- a/beacon_node/http_api/tests/tests.rs +++ b/beacon_node/http_api/tests/tests.rs @@ -141,6 +141,7 @@ impl ApiTester { enabled: true, listen_addr: Ipv4Addr::new(127, 0, 0, 1), listen_port: 0, + allow_origin: None, }, chain: Some(chain.clone()), network_tx: Some(network_tx), @@ -1412,7 +1413,7 @@ impl ApiTester { }; self.client - .post_validator_beacon_committee_subscriptions(&subscription) + .post_validator_beacon_committee_subscriptions(&[subscription]) .await .unwrap(); diff --git a/beacon_node/tests/test.rs b/beacon_node/tests/test.rs index a845acf04df..7d860538f9b 100644 --- a/beacon_node/tests/test.rs +++ b/beacon_node/tests/test.rs @@ -3,6 +3,7 @@ use beacon_chain::StateSkipConfig; use node_test_rig::{ environment::{Environment, EnvironmentBuilder}, + eth2::types::StateId, testing_client_config, LocalBeaconNode, }; use types::{EthSpec, MinimalEthSpec, Slot}; @@ -34,10 +35,12 @@ fn http_server_genesis_state() { let node = build_node(&mut env); let remote_node = node.remote_node().expect("should produce remote node"); - let (api_state, _root) = env + let api_state = env .runtime() - .block_on(remote_node.http.beacon().get_state_by_slot(Slot::new(0))) - .expect("should fetch state from http api"); + .block_on(remote_node.get_debug_beacon_states(StateId::Slot(Slot::new(0)))) + .expect("should fetch state from http api") + .unwrap() + .data; let mut db_state = node .client