Fix release tests

This commit is contained in:
Jimmy Chen 2023-08-08 17:33:25 +10:00
parent d401633100
commit 3ba9047437
No known key found for this signature in database
GPG Key ID: 7AAEE02659DCF690
5 changed files with 12 additions and 6 deletions

View File

@ -210,7 +210,8 @@ pub async fn gossip_full_pass_ssz() {
let slot_b = slot_a + 1;
let state_a = tester.harness.get_current_state();
let (block, _): (SignedBeaconBlock<E>, _) = tester.harness.make_block(state_a, slot_b).await;
let ((block, _), _): ((SignedBeaconBlock<E>, _), _) =
tester.harness.make_block(state_a, slot_b).await;
let response: Result<(), eth2::Error> = tester
.client
@ -906,7 +907,7 @@ pub async fn blinded_gossip_full_pass_ssz() {
let slot_b = slot_a + 1;
let state_a = tester.harness.get_current_state();
let (block, _): (SignedBlindedBeaconBlock<E>, _) =
let ((block, _), _): ((SignedBlindedBeaconBlock<E>, _), _) =
tester.harness.make_blinded_block(state_a, slot_b).await;
let response: Result<(), eth2::Error> = tester

View File

@ -1307,7 +1307,11 @@ impl ApiTester {
.await
.0;
assert!(self.client.post_beacon_blocks_ssz(&block).await.is_err());
assert!(self
.client
.post_beacon_blocks_ssz(&SignedBlockContents::from(block))
.await
.is_err());
assert!(
self.network_rx.network_recv.recv().await.is_some(),

View File

@ -343,7 +343,7 @@ impl TestRig {
self.network_beacon_processor
.send_blobs_by_range_request(
PeerId::random(),
(ConnectionId::new(42), SubstreamId::new(24)),
(ConnectionId::new_unchecked(42), SubstreamId::new(24)),
BlobsByRangeRequest {
start_slot: 0,
count,

View File

@ -707,7 +707,7 @@ impl BeaconNodeHttpClient {
/// Returns `Ok(None)` on a 404 error.
pub async fn post_beacon_blocks_ssz<T: EthSpec, Payload: AbstractExecPayload<T>>(
&self,
block: &SignedBeaconBlock<T, Payload>,
block: &SignedBlockContents<T, Payload>,
) -> Result<(), Error> {
let mut path = self.eth_path(V1)?;

View File

@ -1424,9 +1424,10 @@ pub type BlockContentsTuple<T, Payload> = (
);
/// A wrapper over a [`SignedBeaconBlock`] or a [`SignedBeaconBlockAndBlobSidecars`].
#[derive(Clone, Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, Encode, Serialize, Deserialize)]
#[serde(untagged)]
#[serde(bound = "T: EthSpec")]
#[ssz(enum_behaviour = "transparent")]
pub enum SignedBlockContents<T: EthSpec, Payload: AbstractExecPayload<T> = FullPayload<T>> {
BlockAndBlobSidecars(SignedBeaconBlockAndBlobSidecars<T, Payload>),
Block(SignedBeaconBlock<T, Payload>),