Skip to content

Commit

Permalink
revert-or-fixme: add debug log lines
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite committed Nov 12, 2023
1 parent bb87722 commit bcfbef1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/appgateserver/jsonrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ func (app *appGateServer) handleJSONRPCRelay(
}
relayRequest.Meta.Signature = signature

log.Printf("DEBUG: relayRequest: %+v", relayRequest)

// Marshal the relay request to bytes and create a reader to be used as an HTTP request body.
relayRequestBz, err := relayRequest.Marshal()
if err != nil {
Expand All @@ -94,6 +96,8 @@ func (app *appGateServer) handleJSONRPCRelay(
Body: relayRequestReader,
}

log.Printf("DEBUG: relayHTTPRequest: %+v", relayHTTPRequest)

// Perform the HTTP request to the relayer.
log.Printf("DEBUG: Sending signed relay request to %s", supplierUrl)
relayHTTPResponse, err := http.DefaultClient.Do(relayHTTPRequest)
Expand All @@ -111,7 +115,8 @@ func (app *appGateServer) handleJSONRPCRelay(

// Unmarshal the response bytes into a RelayResponse.
relayResponse := &types.RelayResponse{}
log.Printf("relayHTTPResponse: %s", string(relayResponseBz))
log.Printf("DEBUG: relayHTTPResponse body: %s", string(relayResponseBz))
log.Printf("DEBUG: relayHTTPResponse: %+v", relayHTTPResponse)
if err := relayResponse.Unmarshal(relayResponseBz); err != nil {
log.Println("ERROR: Failed unmarshaling relay response")
return err
Expand Down

0 comments on commit bcfbef1

Please sign in to comment.