(entry RequestEntry)
| 31 | } |
| 32 | |
| 33 | func (d *postgresStore) SaveRequestEntry(entry RequestEntry) error { |
| 34 | query := `INSERT INTO rpc_endpoint_requests |
| 35 | (id, received_at, request_duration_ms, is_batch_request, num_request_in_batch, http_method, http_url, http_query_param, http_response_status, ip_hash, origin, host, error) VALUES (:id, :received_at, :request_duration_ms, :is_batch_request, :num_request_in_batch, :http_method, :http_url, :http_query_param, :http_response_status, :ip_hash, :origin, :host, :error)` |
| 36 | ctx, cancel := context.WithTimeout(context.Background(), connTimeOut) |
| 37 | defer cancel() |
| 38 | _, err := d.DB.NamedExecContext(ctx, query, entry) |
| 39 | return err |
| 40 | } |
| 41 | |
| 42 | func (d *postgresStore) SaveRawTxEntries(entries []*EthSendRawTxEntry) error { |
| 43 | query := `INSERT INTO rpc_endpoint_eth_send_raw_txs (id, request_id, is_on_oafc_list, is_white_hat_bundle_collection, white_hat_bundle_id, is_cancel_tx, needs_front_running_protection, was_sent_to_relay, was_sent_to_mempool, is_blocked, error, error_code, tx_raw, tx_hash, tx_from, tx_to, tx_nonce, tx_data, tx_smart_contract_method,fast) VALUES (:id, :request_id, :is_on_oafc_list, :is_white_hat_bundle_collection, :white_hat_bundle_id, :is_cancel_tx, :needs_front_running_protection, :was_sent_to_relay, :was_sent_to_mempool, :is_blocked, :error, :error_code, :tx_raw, :tx_hash, :tx_from, :tx_to, :tx_nonce, :tx_data, :tx_smart_contract_method, :fast)` |
nothing calls this directly
no outgoing calls
no test coverage detected