Skip to content

Commit f8523b4

Browse files
fixed pre-merge tests
1 parent 6f70e93 commit f8523b4

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

beacon_node/http_api/tests/tests.rs

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3533,8 +3533,30 @@ impl ApiTester {
35333533

35343534
self.chain.slot_clock.set_slot(slot.as_u64() + 1);
35353535
}
3536-
ProduceBlockV3Response::Full(_) => {
3537-
panic!("Expecting a blinded block");
3536+
ProduceBlockV3Response::Full(block_contents) => {
3537+
assert!(!metadata.execution_payload_blinded);
3538+
assert_eq!(
3539+
metadata.consensus_version,
3540+
block_contents
3541+
.block()
3542+
.to_ref()
3543+
.fork_name(&self.chain.spec)
3544+
.unwrap()
3545+
);
3546+
let signed_block_contents =
3547+
block_contents.sign(&sk, &fork, genesis_validators_root, &self.chain.spec);
3548+
3549+
self.client
3550+
.post_beacon_blocks(&signed_block_contents)
3551+
.await
3552+
.unwrap();
3553+
3554+
assert_eq!(
3555+
self.chain.head_beacon_block(),
3556+
*signed_block_contents.signed_block()
3557+
);
3558+
3559+
self.chain.slot_clock.set_slot(slot.as_u64() + 1);
35383560
}
35393561
}
35403562
}
@@ -3634,8 +3656,8 @@ impl ApiTester {
36343656
ProduceBlockV3Response::Blinded(blinded_block) => {
36353657
assert_eq!(blinded_block.slot(), slot);
36363658
}
3637-
ProduceBlockV3Response::Full(_) => {
3638-
panic!("Expecting a blinded block");
3659+
ProduceBlockV3Response::Full(full_block) => {
3660+
assert_eq!(full_block.block().slot(), slot);
36393661
}
36403662
}
36413663

0 commit comments

Comments
 (0)