Commit e1810e3 1 parent e8f33fd commit e1810e3 Copy full SHA for e1810e3
File tree 1 file changed +16
-12
lines changed
1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -65,12 +65,14 @@ where
65
65
[ ( ) ; S :: SYNC_COMMITTEE_DEPTH ] : ,
66
66
[ ( ) ; S :: FINALIZED_HEADER_INDEX ] : ,
67
67
{
68
- if let Err ( e) = state. concurrency . clone ( ) . acquire_owned ( ) . await {
69
- return Err ( JsonRpcError :: internal ( format ! (
70
- "Failed to acquire concurrency lock: {}" ,
71
- e
72
- ) ) ) ;
73
- } ;
68
+ let _permit = state
69
+ . concurrency
70
+ . clone ( )
71
+ . acquire_owned ( )
72
+ . await
73
+ . map_err ( |e| {
74
+ JsonRpcError :: internal ( format ! ( "Failed to acquire concurrency lock: {}" , e) )
75
+ } ) ?;
74
76
75
77
let GenProofCommitteeUpdateParams {
76
78
light_client_update,
@@ -119,12 +121,14 @@ where
119
121
[ ( ) ; S :: BYTES_PER_LOGS_BLOOM ] : ,
120
122
[ ( ) ; S :: MAX_EXTRA_DATA_BYTES ] : ,
121
123
{
122
- if let Err ( e) = state. concurrency . clone ( ) . acquire_owned ( ) . await {
123
- return Err ( JsonRpcError :: internal ( format ! (
124
- "Failed to acquire concurrency lock: {}" ,
125
- e
126
- ) ) ) ;
127
- } ;
124
+ let _permit = state
125
+ . concurrency
126
+ . clone ( )
127
+ . acquire_owned ( )
128
+ . await
129
+ . map_err ( |e| {
130
+ JsonRpcError :: internal ( format ! ( "Failed to acquire concurrency lock: {}" , e) )
131
+ } ) ?;
128
132
129
133
let GenProofStepParams {
130
134
light_client_finality_update,
You can’t perform that action at this time.
0 commit comments