processRequest handles single request
(client RPCProxyClient, jsonReq *types.JSONRPCRequest, origin, referer string, isWhitehatBundleCollection bool, whitehatBundleID string, urlParams URLParameters)
| 113 | |
| 114 | // processRequest handles single request |
| 115 | func (r *RPCRequestHandler) processRequest(client RPCProxyClient, jsonReq *types.JSONRPCRequest, origin, referer string, isWhitehatBundleCollection bool, whitehatBundleID string, urlParams URLParameters) { |
| 116 | var entry *database.EthSendRawTxEntry |
| 117 | if jsonReq.Method == "eth_sendRawTransaction" { |
| 118 | entry = r.requestRecord.AddEthSendRawTxEntry(uuid.New()) |
| 119 | } |
| 120 | // Handle single request |
| 121 | rpcReq := NewRPCRequest(r.logger, client, jsonReq, r.relaySigningKey, r.relayURL, origin, referer, isWhitehatBundleCollection, whitehatBundleID, entry, urlParams, r.chainID) |
| 122 | res := rpcReq.ProcessRequest() |
| 123 | // Write response |
| 124 | r._writeRPCResponse(res) |
| 125 | } |
| 126 | |
| 127 | func (r *RPCRequestHandler) finishRequest() { |
| 128 | reqDuration := time.Since(r.timeStarted) // At end of request, log the time it needed |
no test coverage detected