File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -350,13 +350,11 @@ where
350
350
351
351
debug ! ( context. log( ) , "Downloaded finalized state" ; "slot" => ?state. slot( ) ) ;
352
352
353
- let block_root = state. get_block_root ( state. slot ( ) ) . map_err ( |e| {
354
- format ! ( "Unable to get block root for slot {}: {e:?}" , state. slot( ) )
355
- } ) ?;
353
+ let finalized_block_slot = state. latest_block_header ( ) . slot ;
356
354
357
- debug ! ( context. log( ) , "Downloading finalized block" ; "block_root " => ?block_root ) ;
355
+ debug ! ( context. log( ) , "Downloading finalized block" ; "block_slot " => ?finalized_block_slot ) ;
358
356
let block = remote
359
- . get_beacon_blocks_ssz :: < TEthSpec > ( BlockId :: Root ( * block_root ) , & spec)
357
+ . get_beacon_blocks_ssz :: < TEthSpec > ( BlockId :: Slot ( finalized_block_slot ) , & spec)
360
358
. await
361
359
. map_err ( |e| match e {
362
360
ApiError :: InvalidSsz ( e) => format ! (
You can’t perform that action at this time.
0 commit comments