@@ -105,40 +105,34 @@ func doPOR(config *Config, runtime cre.Runtime, runTime time.Time) (string, erro
105105
106106 logger .Info ("ReserveInfo" , "reserveInfo" , reserveInfo )
107107
108- porResp , err := cre .RunInNodeMode (* config , runtime ,
109- func (config Config , nodeRuntime cre.NodeRuntime ) (PORResponse , error ) {
110- confHttpClient := confidentialhttp.Client {}
111- confOutput , err := confHttpClient .SendRequest (nodeRuntime , & confidentialhttp.ConfidentialHTTPRequest {
112- Request : & confidentialhttp.HTTPRequest {
113- Url : config .URL ,
114- Method : "GET" ,
115- MultiHeaders : map [string ]* confidentialhttp.HeaderValues {
116- "Authorization" : {
117- Values : []string {"Basic {{.API_KEY}}" },
118- },
119- },
120- EncryptOutput : true ,
108+ confHttpClient := confidentialhttp.Client {}
109+ confOutput , err := confHttpClient .SendRequest (runtime , & confidentialhttp.ConfidentialHTTPRequest {
110+ Request : & confidentialhttp.HTTPRequest {
111+ Url : config .URL ,
112+ Method : "GET" ,
113+ MultiHeaders : map [string ]* confidentialhttp.HeaderValues {
114+ "Authorization" : {
115+ Values : []string {"Basic {{.API_KEY}}" },
121116 },
122- VaultDonSecrets : []* confidentialhttp.SecretIdentifier {
123- {
124- Key : "API_KEY" ,
125- },
126- },
127- }).Await ()
128- if err != nil {
129- logger .Error ("error fetching conf por" , "err" , err )
130- return PORResponse {}, err
131- }
132- logger .Info ("Conf POR response" , "response" , confOutput )
133-
134- porResp := & PORResponse {}
135- if err = json .Unmarshal (confOutput .Body , porResp ); err != nil {
136- return PORResponse {}, err
137- }
138-
139- return * porResp , nil
140- }, cre .ConsensusIdenticalAggregation [PORResponse ](),
141- ).Await ()
117+ },
118+ EncryptOutput : true ,
119+ },
120+ VaultDonSecrets : []* confidentialhttp.SecretIdentifier {
121+ {
122+ Key : "API_KEY" ,
123+ },
124+ },
125+ }).Await ()
126+ if err != nil {
127+ logger .Error ("error fetching conf por" , "err" , err )
128+ return "" , err
129+ }
130+ logger .Info ("Conf POR response" , "response" , confOutput )
131+
132+ porResp := & PORResponse {}
133+ if err = json .Unmarshal (confOutput .Body , porResp ); err != nil {
134+ return "" , err
135+ }
142136
143137 if porResp .Ripcord {
144138 return "" , errors .New ("ripcord is true" )
0 commit comments