Skip to content

Commit

Permalink
eth/client: rewrite send to send_request (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
q9f committed Jan 5, 2023
1 parent fffc8fd commit ae0f3dc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/eth/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ def send_command(command, args)
params: marshal(args),
id: next_id,
}
output = JSON.parse(send(payload.to_json))
output = JSON.parse(send_request(payload.to_json))
raise IOError, output["error"]["message"] unless output["error"].nil?
return output
end
Expand Down
2 changes: 1 addition & 1 deletion lib/eth/client/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def initialize(host)
#
# @param payload [Hash] the RPC request parameters.
# @return [String] a JSON-encoded response.
def send(payload)
def send_request(payload)
http = Net::HTTP.new(@host, @port)
http.use_ssl = @ssl
header = { "Content-Type" => "application/json" }
Expand Down
2 changes: 1 addition & 1 deletion lib/eth/client/http_auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def initialize(host)
#
# @param payload [Hash] the RPC request parameters.
# @return [String] a JSON-encoded response.
def send(payload)
def send_request(payload)
http = Net::HTTP.new(@host, @port)
http.use_ssl = @ssl
header = { "Content-Type" => "application/json" }
Expand Down
2 changes: 1 addition & 1 deletion lib/eth/client/ipc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def initialize(path)
#
# @param payload [Hash] the RPC request parameters.
# @return [String] a JSON-encoded response.
def send(payload)
def send_request(payload)
socket = UNIXSocket.new(@path)
socket.puts(payload)
read = socket.recvmsg(nil)[0]
Expand Down

0 comments on commit ae0f3dc

Please sign in to comment.