Skip to content

Commit 00f985e

Browse files
fixed pre-merge tests
1 parent c1b4350 commit 00f985e

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

37093709
self.chain.slot_clock.set_slot(slot.as_u64() + 1);
37103710
}
3711-
ProduceBlockV3Response::Full(_) => {
3712-
panic!("Expecting a blinded block");
3711+
ProduceBlockV3Response::Full(block_contents) => {
3712+
assert!(!metadata.execution_payload_blinded);
3713+
assert_eq!(
3714+
metadata.consensus_version,
3715+
block_contents
3716+
.block()
3717+
.to_ref()
3718+
.fork_name(&self.chain.spec)
3719+
.unwrap()
3720+
);
3721+
let signed_block_contents =
3722+
block_contents.sign(&sk, &fork, genesis_validators_root, &self.chain.spec);
3723+
3724+
self.client
3725+
.post_beacon_blocks(&signed_block_contents)
3726+
.await
3727+
.unwrap();
3728+
3729+
assert_eq!(
3730+
self.chain.head_beacon_block(),
3731+
*signed_block_contents.signed_block()
3732+
);
3733+
3734+
self.chain.slot_clock.set_slot(slot.as_u64() + 1);
37133735
}
37143736
}
37153737
}
@@ -3809,8 +3831,8 @@ impl ApiTester {
38093831
ProduceBlockV3Response::Blinded(blinded_block) => {
38103832
assert_eq!(blinded_block.slot(), slot);
38113833
}
3812-
ProduceBlockV3Response::Full(_) => {
3813-
panic!("Expecting a blinded block");
3834+
ProduceBlockV3Response::Full(full_block) => {
3835+
assert_eq!(full_block.block().slot(), slot);
38143836
}
38153837
}
38163838

0 commit comments

Comments
 (0)