@@ -1141,23 +1141,32 @@ pub fn serve<T: BeaconChainTypes>(
11411141 |state, execution_optimistic, finalized| {
11421142 if !state. fork_name_unchecked ( ) . electra_enabled ( ) {
11431143 return Err ( warp_utils:: reject:: pre_electra_not_supported (
1144- format ! ( "state at epoch {} is not activated for Electra" , state. current_epoch( ) )
1144+ format ! (
1145+ "state at epoch {} is not activated for Electra" ,
1146+ state. current_epoch( )
1147+ ) ,
11451148 ) ) ;
11461149 }
11471150
11481151 let Ok ( deposits) = state. pending_deposits ( ) else {
1149- return Err ( warp_utils:: reject:: custom_bad_request ( "Pending deposits not found" . to_string ( ) ) ) ;
1152+ return Err ( warp_utils:: reject:: custom_bad_request (
1153+ "Pending deposits not found" . to_string ( ) ,
1154+ ) ) ;
11501155 } ;
11511156
1152- Ok ( ( deposits. iter ( ) . cloned ( ) . collect :: < Vec < _ > > ( ) , execution_optimistic, finalized) )
1153- }
1157+ Ok ( (
1158+ deposits. iter ( ) . cloned ( ) . collect :: < Vec < _ > > ( ) ,
1159+ execution_optimistic,
1160+ finalized,
1161+ ) )
1162+ } ,
11541163 ) ?;
11551164
1156- Ok ( api_types:: ExecutionOptimisticFinalizedResponse {
1157- data,
1158- execution_optimistic : Some ( execution_optimistic) ,
1159- finalized : Some ( finalized) ,
1160- } )
1165+ Ok ( api_types:: ExecutionOptimisticFinalizedResponse {
1166+ data,
1167+ execution_optimistic : Some ( execution_optimistic) ,
1168+ finalized : Some ( finalized) ,
1169+ } )
11611170 } )
11621171 } ,
11631172 ) ;
@@ -1178,28 +1187,36 @@ pub fn serve<T: BeaconChainTypes>(
11781187 |state, execution_optimistic, finalized| {
11791188 if !state. fork_name_unchecked ( ) . electra_enabled ( ) {
11801189 return Err ( warp_utils:: reject:: pre_electra_not_supported (
1181- format ! ( "state at epoch {} is not activated for Electra" , state. current_epoch( ) )
1190+ format ! (
1191+ "state at epoch {} is not activated for Electra" ,
1192+ state. current_epoch( )
1193+ ) ,
11821194 ) ) ;
11831195 }
11841196
11851197 let Ok ( withdrawals) = state. pending_partial_withdrawals ( ) else {
1186- return Err ( warp_utils:: reject:: custom_bad_request ( "Pending withdrawals not found" . to_string ( ) ) ) ;
1198+ return Err ( warp_utils:: reject:: custom_bad_request (
1199+ "Pending withdrawals not found" . to_string ( ) ,
1200+ ) ) ;
11871201 } ;
11881202
1189- Ok ( ( withdrawals. iter ( ) . cloned ( ) . collect :: < Vec < _ > > ( ) , execution_optimistic, finalized) )
1190- }
1203+ Ok ( (
1204+ withdrawals. iter ( ) . cloned ( ) . collect :: < Vec < _ > > ( ) ,
1205+ execution_optimistic,
1206+ finalized,
1207+ ) )
1208+ } ,
11911209 ) ?;
11921210
1193- Ok ( api_types:: ExecutionOptimisticFinalizedResponse {
1194- data,
1195- execution_optimistic : Some ( execution_optimistic) ,
1196- finalized : Some ( finalized) ,
1197- } )
1211+ Ok ( api_types:: ExecutionOptimisticFinalizedResponse {
1212+ data,
1213+ execution_optimistic : Some ( execution_optimistic) ,
1214+ finalized : Some ( finalized) ,
1215+ } )
11981216 } )
11991217 } ,
12001218 ) ;
12011219
1202-
12031220 // GET beacon/headers
12041221 //
12051222 // Note: this endpoint only returns information about blocks in the canonical chain. Given that
0 commit comments