Skip to content

Commit 37609f6

Browse files
fixed pre-merge tests
1 parent f6447de commit 37609f6

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
@@ -3714,8 +3714,30 @@ impl ApiTester {
37143714

37153715
self.chain.slot_clock.set_slot(slot.as_u64() + 1);
37163716
}
3717-
ProduceBlockV3Response::Full(_) => {
3718-
panic!("Expecting a blinded block");
3717+
ProduceBlockV3Response::Full(block_contents) => {
3718+
assert!(!metadata.execution_payload_blinded);
3719+
assert_eq!(
3720+
metadata.consensus_version,
3721+
block_contents
3722+
.block()
3723+
.to_ref()
3724+
.fork_name(&self.chain.spec)
3725+
.unwrap()
3726+
);
3727+
let signed_block_contents =
3728+
block_contents.sign(&sk, &fork, genesis_validators_root, &self.chain.spec);
3729+
3730+
self.client
3731+
.post_beacon_blocks(&signed_block_contents)
3732+
.await
3733+
.unwrap();
3734+
3735+
assert_eq!(
3736+
self.chain.head_beacon_block(),
3737+
*signed_block_contents.signed_block()
3738+
);
3739+
3740+
self.chain.slot_clock.set_slot(slot.as_u64() + 1);
37193741
}
37203742
}
37213743
}
@@ -3815,8 +3837,8 @@ impl ApiTester {
38153837
ProduceBlockV3Response::Blinded(blinded_block) => {
38163838
assert_eq!(blinded_block.slot(), slot);
38173839
}
3818-
ProduceBlockV3Response::Full(_) => {
3819-
panic!("Expecting a blinded block");
3840+
ProduceBlockV3Response::Full(full_block) => {
3841+
assert_eq!(full_block.block().slot(), slot);
38203842
}
38213843
}
38223844

0 commit comments

Comments
 (0)