File tree Expand file tree Collapse file tree 1 file changed +26
-4
lines changed
beacon_node/http_api/tests Expand file tree Collapse file tree 1 file changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -3533,8 +3533,30 @@ impl ApiTester {
3533
3533
3534
3534
self . chain . slot_clock . set_slot ( slot. as_u64 ( ) + 1 ) ;
3535
3535
}
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 ) ;
3538
3560
}
3539
3561
}
3540
3562
}
@@ -3634,8 +3656,8 @@ impl ApiTester {
3634
3656
ProduceBlockV3Response :: Blinded ( blinded_block) => {
3635
3657
assert_eq ! ( blinded_block. slot( ) , slot) ;
3636
3658
}
3637
- ProduceBlockV3Response :: Full ( _ ) => {
3638
- panic ! ( "Expecting a blinded block" ) ;
3659
+ ProduceBlockV3Response :: Full ( full_block ) => {
3660
+ assert_eq ! ( full_block . block( ) . slot ( ) , slot ) ;
3639
3661
}
3640
3662
}
3641
3663
You can’t perform that action at this time.
0 commit comments